Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My desktop application in C# wishes to utilize a free service that is available on the web. I want the user to be able to pass a string entered in the application directly to the website input box so that information does not have to be hand-typed into the input box.

The website input box looks like this:
Posted
Updated 13-Dec-19 9:25am
v2
Comments
BobbyStrain 12-Dec-19 16:40pm    
I use Selenium for such tasks.
PDTUM 12-Dec-19 18:05pm    
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.
Richard MacCutchan 13-Dec-19 5:09am    
There is no code in your question. you need to paste it again, and ensure that it is surrounded by <pre> tags so it is correctly formatted. I don't know why you think CodeProject is less friendly, but if you have specific problems then please report them to the administrators in the Bugs and Suggestions[^] forum.
PDTUM 13-Dec-19 15:23pm    
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!
Richard MacCutchan 13-Dec-19 15:52pm    
If I have understood what you are trying to do, this is known as webscraping. Webscraping is just automating a process to read information from a website after sending some command or commands. I have done it myself using the WebBrowser Control (Windows Forms) | Microsoft Docs[^]. This allows you to send messages to a website and extract information from the returned pages.

1 solution

C#
<pre><input id ="sometext" class = "form-control-sometext clearable"
        placholder = "Enter Infor Here" type = "text" name = "moreText">
 
Share this answer
 
Comments
Dave Kreskowiak 13-Dec-19 16:03pm    
Your "answer" has absolutely nothing to do with the OP's question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900