Click here to Skip to main content
15,891,513 members
Home / Discussions / C#
   

C#

 
QuestionAutomatically Update the application using Publish Pin
Neeraj Jain10-Apr-07 20:15
Neeraj Jain10-Apr-07 20:15 
QuestionC#.Net tutorials Pin
Malayil alex10-Apr-07 19:59
Malayil alex10-Apr-07 19:59 
AnswerRe: C#.Net tutorials Pin
Sathesh Sakthivel10-Apr-07 20:17
Sathesh Sakthivel10-Apr-07 20:17 
Questionin browsers (such as IE) how can emulate a button click event ? Pin
B.A10-Apr-07 19:46
B.A10-Apr-07 19:46 
AnswerRe: in browsers (such as IE) how can emulate a button click event ? Pin
Martin#10-Apr-07 20:41
Martin#10-Apr-07 20:41 
AnswerRe: in browsers (such as IE) how can emulate a button click event ? Pin
blackjack215010-Apr-07 22:03
blackjack215010-Apr-07 22:03 
GeneralRe: in browsers (such as IE) how can emulate a button click event ? Pin
B.A10-Apr-07 23:37
B.A10-Apr-07 23:37 
GeneralRe: in browsers (such as IE) how can emulate a button click event ? Pin
blackjack215011-Apr-07 0:06
blackjack215011-Apr-07 0:06 
An simple example of how to do an automatic search on google:

Place a WebBrowser control on your form.
Use it's navigate method to load the google page:

MyWebBrowser.Navigate("http://www.google.com");

In order to access the controls on the webpage and use the you need to know what their names are from the html source of the page. If you take a look at google's source you'll see all the controls, and among them these two:

<input maxlength=2048 name=q size=55 title="Google Search" value="">

and

<input name=btnG type=submit value="Google Search">

The first one is the text box where you type the text to search and the second is the search button.

So, all you need to do is fill the text box and after that simulate clicking the "Google Search" button. Like this:

<br />
HtmlElement searchBox = MyWebBrowser.Document.All["q"];<br />
            searchBox.InnerText = "code project";<br />
            HtmlElement btnSearch = MyWebBrowser.Document.All["btnG"];<br />
            btnSearch.InvokeMember("click");


Hope this helps.

Have a nice day!
GeneralRe: in browsers (such as IE) how can emulate a button click event ? Pin
blackjack215011-Apr-07 0:09
blackjack215011-Apr-07 0:09 
QuestionParsing XML with XPath Navigator [modified] Pin
Kodanda Pani10-Apr-07 19:28
Kodanda Pani10-Apr-07 19:28 
AnswerRe: Parsing XML with XPath Navigator Pin
gauthee10-Apr-07 19:38
gauthee10-Apr-07 19:38 
GeneralRe: Parsing XML with XPath Navigator Pin
Kodanda Pani10-Apr-07 19:57
Kodanda Pani10-Apr-07 19:57 
QuestionNotification when a new column is added to a table Pin
deepakts10-Apr-07 19:17
deepakts10-Apr-07 19:17 
QuestionConvert string value to a data type Pin
swjam10-Apr-07 17:23
swjam10-Apr-07 17:23 
AnswerRe: Convert string value to a data type Pin
Mark Greenwood10-Apr-07 17:41
Mark Greenwood10-Apr-07 17:41 
GeneralRe: Convert string value to a data type Pin
swjam10-Apr-07 18:04
swjam10-Apr-07 18:04 
AnswerRe: Convert string value to a data type Pin
Guffa10-Apr-07 21:07
Guffa10-Apr-07 21:07 
GeneralRe: Convert string value to a data type Pin
J4amieC10-Apr-07 22:06
J4amieC10-Apr-07 22:06 
GeneralRe: Convert string value to a data type Pin
swjam11-Apr-07 2:22
swjam11-Apr-07 2:22 
QuestionData Access Layer on Web Service Pin
Tuwing.Sabado10-Apr-07 16:49
Tuwing.Sabado10-Apr-07 16:49 
AnswerRe: Data Access Layer on Web Service Pin
Sathesh Sakthivel10-Apr-07 17:59
Sathesh Sakthivel10-Apr-07 17:59 
Questioncreate dll Pin
albertin0410-Apr-07 16:24
albertin0410-Apr-07 16:24 
AnswerRe: create dll Pin
Not Active10-Apr-07 16:45
mentorNot Active10-Apr-07 16:45 
GeneralRe: create dll Pin
albertin0410-Apr-07 16:55
albertin0410-Apr-07 16:55 
QuestionPer-user Windows Service Pin
Vega0210-Apr-07 15:59
Vega0210-Apr-07 15:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.