15,895,740 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by PDTUM (Top 10 by date)
PDTUM
13-Dec-19 15:23pm
View
Hello Richard. Thank you for your response. Please see the following:
The Webpage textbox looks like this:
Beginning, let me thank you. I do not think that I explained it properly, which happens when you are trying not to reveal private information. First, the page that is 'sending' the data is not mypage.ascx ... it is mypage.cs (Winforms, not a web page). Second, the website is not mine. It is a resource. But because it is public, let me lift the veil off it. I am trying to use a site called (www.decodethis.com). It is totally legitimate to use it, but many of my customers that use the site by reference make mistakes when transferring the 17 digit VIN number to the site manually. My idea was to have them enter the information inside the application that I wrote and have it passed to the 'decodthis' page to have it processed and get a result. I am not sure that it is even possible to do this, but since it should not matter whether the number to be decoded was entered manually or automatically, it seemed to make sense to do it this way. If it would help. I could make a webpage on my end and then use aspx.cs code to accomplish the same thing if that would work. But I prefer to use the actual application if possible. With that said, all the information about the web text box is visible using the element examination feature. SO ... perhaps using the real-life naming on the actual page ... could you please suggest a way to accomplish this task (if it can be done at all?). All I want to do is pass the information from the desktop application (main.cs) to the webpage (www.decodethis.com) automatically. Thank you again!
PDTUM
12-Dec-19 18:05pm
View
Bobby, thank you for your reply. I do not know why the complete information that I posted did not appear, so I apologize. I gave a precise example of what I was trying to do. I have been using Code Project for over 15 years and it gets less friendly every year. I looked into Selenium and I do not understand how to install it or what it even does. The download does not have an executable. But it was important to me to make time to thank you for your advice and effort. Best Regards, Pat.
PDTUM
28-Mar-17 13:46pm
View
And so ... I am sorry to say it did not make a difference. Just in case, I am posting what I tried below. I also tried hard coding the string into the src call on the aspx page. I think it was a GREAT idea, and I thought this was it. Back to square one. If you have any other thoughts or see a problem with my code, let me know. Many thanks, Pat.
string pdfPage = "https://docs.google.com/gview?url=" + doc + "&embedded=true";
pdf.Attributes.Add("src", pdfPage);
PDTUM
28-Mar-17 13:26pm
View
Wow Richard. Great thought. The answer is YES, it is a secure site. I told my network architect that I thought it was a config issue, and now I might be vindicated. I don't know if this is the fix, but it is sure promising. I REALLY APPRECIATE the idea and I am going to try it out shortly. I spent the entire day yesterday undoing all the old code and changing to JavaScript (which I hate but it does work). I would happily invest another day to put it all back. Just one more question if I may? Why is there an issue with the iFrame? Also, I got it to work correctly in IE Edge on Windows 10 using an Embed code (posted below), but it would not work in Chrome or Firefox (which is my developer default). I'll post results here. Keep in touch. Code follows. Best Regards, Pat.
(This works in Edge!)
pdfViewer.InnerHtml = "<embed src='" + item + "' type='application/pdf' scrolling='auto' height='530px' width='560px'>";
PDTUM
27-Mar-17 12:15pm
View
Hello Tandit, THANK YOU for your reply!
So, the reason that I used Google Docs at all is that I could not get it to work in an HTML5 iFrame and some others I have spoken to have used this technique successfully with Google Docs. Below is the original code:
if (Session["Document"].ToString() != string.Empty)
{
string document = Session["Document"].ToString();
pdfIframe.Attributes.Add("src", document);
}
Although you may be right about Google Docs (I do not know), that does not explain why it will not work with a regular iFrame, as it is supposed to in HTML5. This is not a contest or a challenge. I greatly appreciate your reply and suggestion. With that said, I find it incredible to believe that there is no real C# solution to address viewing a PDF in an HTML format! Yes, I could easily get the job done by using a text area with a database query (Fast and Easy!), but it looks so unprofessional. I even considered taking a picture of the document and posting it as a JPG, however, then multiple pages and scrolling create a new problem. This is very discouraging. I personally really dislike using JAVA and I avoid it except where absolutely necessary. This is why I choose to write desktop applications and I avoid the internet unless it is absolutely necessary. If you could explain why the iFrame will not work or if you know of any other solution, please let me know. I will be at my desk working for at least the next 6 hours. THANK YOU AGAIN for your input and advice. It is appreciated! Pat.
PDTUM
15-Mar-17 15:43pm
View
OK Gentleman; For those following this thread and were nice enough to point me in the right direction, I was able to finally figure out how to get the error to read out and then I could of course fix it once I knew what it was. So... now, although there is no error, the pages simply don't work. And that goes for two types of pages. In the VS program, I pass a string to an i-Frame that has the location and file name in it through the code behind. I have now tried this in two ways; one uses the i-Frame directly, as in the first example above, and then I tried it with Google Docs embedded, as in the second example. Both work in the Dev Studio software, neither works as a stand alone web page on the Net. Also, the string source makes no difference. One way is to obtain it through an Sql query, the other passes the string from a combo box ... neither one works. I am exasperated with this project. Why? Again, I ask for your help. Thank you, Pat.
PDTUM
12-Mar-17 12:26pm
View
Thank you Afzaal, It is a Runtime Error and I did not see the actual error in the error page. Not sure how to do that but I will look into it today. I will post what it said below.
As to "some add on" ... honestly, that's really way too vague for an answer. As stated, I am using the internal asp.net browser function that comes with Visual Studio 10, and it works perfectly. So I would "assume" that someone with more expertise than I have about Browsers could tell me if I need to add something to the program for it work on standard type browsers. If that's the case, then knowing which add on is required would be the answer that I am looking for. The only other way I can think of to resolve the problem is not to use pdf's and instead do a 'database' pull for the information as text and post it to a text area (not very pretty); and that seems like a very poor compromise. Thanks again for your input. I'm all ears if you can follow up on this. Best Regards, Pat
PDTUM
19-Feb-17 1:07am
View
Thank You Bryian. I figured this out just after I sent the question (after initially losing half a day), but your solution was correct and your supplemental addtional fix sounds like a good idea and is appreciated. It is my pleasure to mark this as the correct answer. Pat.
PDTUM
18-Nov-15 17:21pm
View
Hello Sergey. Thank you for your response. Well, yes, there was a real URL in there or I would not have gotten a server response, so to clarify, let me try this again:
string Url = "http://MyWebPage.com/User_Images";
As to the second question, the answer is "I Don't Know". I thought that the code would need to include some kind of "login" so that the upload could be authenticated, but that was just a guess on my part. None of the MSFT samples I read showed one. I am a application programmer and I avoid web stuff except when necessary to interface it for some reason or other. I thought that perhaps the web client might have an overload that accepts arguments to pass along, but that is not the case. So, I 'assume ' that there must be a line or two of code to make that happen from within the statement? Again, I am asking, not suggesting. Can you help me along? Thank you.
PDTUM
28-Jun-10 14:10pm
View
Reason for my vote of 5
Yes, I now see that there are several "workarounds". My initial search said that this could not done directly. I appreciate your reply and thank you. I do want to say that, of the solutions that I have seen, they seem much more complicated than they should have to be. My own solution involves about 5 lines of code and works perfect. Too bad about the value passing, but I am sure that I can find a way around it, perhaps a custom message box of sorts. Regards, Pat
Show More