posting data to remote URL using WebBrowser
-
hello, i am using the WebBrowser Navigate to navigate to a webpage from my c# application. i try to post data to a form which is in that page. (its my page , i control it) first , what is the name of the field i need to put in the post string? is it ID or NAME ? second , i tried various methods but none filled the form textbox with the information i sent. what am i doing wrong? here's the c# code
WebBrowser Web = new WebBrowser();
string postdata = "ctl00_pass=1234";
System.Text.Encoding a = System.Text.Encoding.UTF8;
byte[] SendBytes = a.GetBytes(postdata);Web.Navigate(WebBase + WebAddress, WebTitle, SendBytes, "Content-Type: application/x-www-form-urlencoded");
.and here's the website
<form name="aspnetForm" method="post" action="default.aspx?key=5555" id="aspnetForm">
<input name="ctl00$pass" type="text" id="ctl00_pass" />
</form>
.tnx