views:

206

answers:

3

I want to log on to this site with my company's user and password from a winforms application, I am displaying the page on a webBrowser control, any Ideas?

A: 

Install Firebug in Firefox, and open the firebug console to view the postback that is sent when you login. You can then use this information to perform a postback using WebRequest class to login directly from your Winform application.

AaronLS
Can you please give some instructions on this workaround?
Luiscencio
A: 

There is a web-UI testing framework called watin. But this does many things other than what you are looking for & I don't know, if you really need such a thing.

shahkalpesh
+2  A: 

You need write code to find controls by tag or id like

webBrowser1.Document.GetElementById("textName").SetAttribute("value") = "ddddd" ;

Before this code just make sure document is completely loaded. You can use WebBrowserDocumentCompletedEventHandler to do a check for this.

geekonweb
did not think the solution was this simple
Luiscencio
do you know how to perform a click over an element?
Luiscencio