How to log into port 80 to enter credentials via a webbrowser control in c#? -


I have to use a webbrover control, which must be entered in the router's html page. I want to login it but bypass the log in the pop up screen.

Please suggest to me how I can get it through the control of webbreeze on Windows Forms.

EDIT: This is that I can see in the source page after that credentials are not sure that it helps.

  if (F.now_proto.value == "pppoe" || Foone_proto.value == "PPTP" || FoOn_ProPo.value == "L2tp" || F. Nova_proti.valui = = "Heart beat") {if (F.ppp_username.value == "") {// alert ("You need user name input!"); Warning (errmsg.err0); F.ppp_username.focus (); return false; } If (F.ppp_passwd.value == "") {// Warning ("You must input password!"); Warning (errmsg.err6); F.ppp_passwd.focus (); return false; }   

Update: solution

webBrowser1.Navigate (http: // username: password@192.168.1.1)

does this

You can manipulate the browser to fill out the form and click submit for you . For example Craigslist I can login like this:

  webBrowser.Document.Forms ["Login"]. All ["inputEmailHandle"] Intratex = @ "user name"; Webbroser.document.forms ["Login"]. All ["InputPages"] Enter = "password"; WebBrowser.Document.Forms ["Login to"] InvokeMember ("Submit").   

I attach it to the pageloaded event of WebBrower control, to see if I am at the proper URL. The "login" section is the name of the form in the source of the crystals. For example, it looks like this:

  & lt; Form id = "login" action = "..." method = "..." & gt;   

and "inputEmailHandle" is the user name / amylo and had "inputpassword" password. Then I just open "submit" and submit the form itself.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -