Click here to Skip to main content
16,012,223 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm developing a windows form app (desktop app) and i have placed a Web Browser Control within it. The web browser displays a web page (URL:- http://srajnishanth.awardspace.us) which has a single text box within it whose element Id is "txtBox".

Now i have a button control (name: btn1) placed on the windows form. When i click the button, some text should appear in the text box which is in the web page contained within the Web Browser Control. Please help me do this.
Forgive me if my question is silly/simple. I'm just a beginner.

Note 1: I DO NOT want to place any button in the web page.
Note 2: I am NOT working in ASP.net. It is just a simple windows Form.
Posted

1 solution

Have a look at the HtmlDocument[^] class, and the HtmlDocument.GetElementById[^] method. Those should be able to do what you're trying to accomplish.
 
Share this answer
 

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