log into a website
-
I put together a simple web browser using c#. Its great, its simple. I added a button. I click the button and I want to be able to log into a particular website. I have this code:
string username = "username";
string password = "pass";
string commit = "Login";
string postData = string.Format("txtuserid={0}&txtpassword={1}&btnlogin={2}", username, password, commit);ASCIIEncoding enc = new ASCIIEncoding();
webBrowser1.Navigate("new page.html", "", enc.GetBytes(postData), "Content-Type: application/x-www-form-urlencoded\r\n");
But it doesnt do anything. Is there a way to make the username and password appear in there respective boxes? Is there another command that I use to make it click that Login button and move onto the next page? Please any response any one can give me will be greatly appreciated.
-
I put together a simple web browser using c#. Its great, its simple. I added a button. I click the button and I want to be able to log into a particular website. I have this code:
string username = "username";
string password = "pass";
string commit = "Login";
string postData = string.Format("txtuserid={0}&txtpassword={1}&btnlogin={2}", username, password, commit);ASCIIEncoding enc = new ASCIIEncoding();
webBrowser1.Navigate("new page.html", "", enc.GetBytes(postData), "Content-Type: application/x-www-form-urlencoded\r\n");
But it doesnt do anything. Is there a way to make the username and password appear in there respective boxes? Is there another command that I use to make it click that Login button and move onto the next page? Please any response any one can give me will be greatly appreciated.
You can't force the textboxes to be completed, especially the password. This is a security feature. Maybe this will help http://forums.asp.net/p/1092704/1647592.aspx#1647592[^]
Failure is not an option; it's the default selection.
-
You can't force the textboxes to be completed, especially the password. This is a security feature. Maybe this will help http://forums.asp.net/p/1092704/1647592.aspx#1647592[^]
Failure is not an option; it's the default selection.
-
You can't force the textboxes to be completed, especially the password. This is a security feature. Maybe this will help http://forums.asp.net/p/1092704/1647592.aspx#1647592[^]
Failure is not an option; it's the default selection.
Is there anything like this I can use: http://www.netomatix.com/httppostdata.aspx If I sent you a sample project, could you help me make it log into a site, any site?