Click here to Skip to main content
13,293,950 members (56,090 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hi friends
I am working on a small windows application, it is like a web browser applicaion, i can read website (fore instance " in application,

now i want to put text from my text boxes to the website's text boxes. plx help

i am going to upload a sample application which explains , kindly update it if any one can do it. (facebook is just an example website..)

download VS project file to edit

view desired output
Posted 2-Jan-13 10:14am
Updated 2-Jan-13 10:16am
DinoRondelly 2-Jan-13 15:18pm
Where are you stuck?
Have you tried google?
Member 8973214 2-Jan-13 15:24pm
here i have just read the page,
now i want to put text from textbox (created by me) to facebook textboxes. as shown in the desired output image..
Zoltán Zörgő 2-Jan-13 15:20pm
I understood what you asked for, but I would like to know why? There are ways to automate a browser, or to embed a browser control in your application. But in many cases there is no need to, it is probably, that you should only simulate the http level behavior of the browser.
Member 8973214 2-Jan-13 15:30pm
I dont know much about webbrowser class and http classes dear.
I just want to do this like automate ( like to save time). facebook is just example here, and i dont want to do this for any misuse etc.
if you can tell me any other website which fulfills this technique then it is also fine for me.
To my understanding, OP is already embedding an instance of the control WebBrowser...
@Member 8973214: is that so?
Zoltán Zörgő 2-Jan-13 15:35pm
I suppose so, but could be a better approach out there...
Member 8973214 2-Jan-13 15:52pm
@Zoltan; cant you help me for this? it is just class assignment, i am student of IT.
Member 8973214 2-Jan-13 15:39pm
@sergey: i am really not sure what is OP?
I just used webbrowser tool and navigate to read the file like this..
webBrowser1.Navigate(new Uri(""));
Oh, sorry for the use of this stupid abbreviation, it's just because too many members use it. I believe it means "Original Poster" or something like that. In this case, this is you. :-)
Solution 1 looks like a right thing to do, did you try it out?
Member 8973214 2-Jan-13 16:04pm
@surgey; oh okay daer,:-) i think its my first time that i asked a question here. yes i tried the solution it works fine. (id can be taken from the html of the page is it?)
Great. Thank you for your confirmation as now I can up-vote this answer, as the author of it deserves it; the solution is correct and practically sensible. I suggest you do the same.
Member 8973214 2-Jan-13 16:16pm
yes 100% perfect solution by HashamAhmad..
Member 8973214 2-Jan-13 16:14pm
Thank you HashamAhmad , Zoltan Zorgo and all for the help.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

consider you have your textbox name txtlogin, your webbrowser control name webBrowser1 and the website have the textbox have the name txtEmailAddress
you use the following code

webBrowser1.Document.GetElementById("txtEmailAddress").SetAttribute("value", txtlogin.Text);

To use the above code, you will be required to handle the DocumentCompleted event of webbrowser control
Member 8973214 2-Jan-13 16:07pm
Hasham thanks for simple solution. I am Adil.:)
I voted 5 for this correct solution, advised OP to do the same.
HashamAhmad 2-Jan-13 16:12pm
welcome Adil :)
HashamAhmad 2-Jan-13 21:12pm
thanks Sergey :) for upvoting and giving the right advice to adil :)
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

It really depend on the complexity of the automation. Putting something on a webpage makes no sense, you either send something to the server, or just draw on an image :). Well, the exact assignment specification could be interesting...

But you have several approaches, some articles and samples to read:
1) Use WebBrowser control, see:
2) Automate the Internet Explorer itself:
If you have not been told to use WebBrowser control, use this one!
3) If you don't need to have a browser at all, use WebClient, see:

But first of all, you should get to know the http protocol. It is a complex one, but the Wikipedia article is a really good starting point.
Member 8973214 2-Jan-13 16:08pm
thanks alot Zoltan, for more references these will help me.:)

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.171207.1 | Last Updated 2 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100