G
Gert
Hi,
I'm having some trouble using the new WebBrowser control in .NET 2.0.
(System.Windows.Forms.WebBrowser)
I'm trying to use the Navigate method to post form data (in my case, a
login form)...
This is the code I'm using:
------------------------------------------------------------------------------------
string url = "http://mysite.com/login.php";
string userName = textBoxUserName.Text;
string password = textBoxPassword.Text;
string postData = "username=" +userName+ "&password=" +password;
byte[] postDataBytes = ASCIIEncoding.ASCII.GetBytes(postData);
string headers = "Content-Type: application/x-www-form-urlencoded" +
"\n" + "\r";
m_browser.Navigate(url, "", postDataBytes, header);
------------------------------------------------------------------------------------
Am I doing something wrong, or is the WebControl not working???
Thx in advance,
Gert
I'm having some trouble using the new WebBrowser control in .NET 2.0.
(System.Windows.Forms.WebBrowser)
I'm trying to use the Navigate method to post form data (in my case, a
login form)...
This is the code I'm using:
------------------------------------------------------------------------------------
string url = "http://mysite.com/login.php";
string userName = textBoxUserName.Text;
string password = textBoxPassword.Text;
string postData = "username=" +userName+ "&password=" +password;
byte[] postDataBytes = ASCIIEncoding.ASCII.GetBytes(postData);
string headers = "Content-Type: application/x-www-form-urlencoded" +
"\n" + "\r";
m_browser.Navigate(url, "", postDataBytes, header);
------------------------------------------------------------------------------------
Am I doing something wrong, or is the WebControl not working???
Thx in advance,
Gert