I'm logging into a WEB page programatically. Using HttpWebRequest, I am doing the following:
1) download the login WEB page.
2) Parse out the VIEWSTATE.
3) Create and encode post data.
4) POST it by writing to stream.
Here's my post data code:
postData = String.Format(
viewState, username, password)
Now, I read an article about how to send the username and password. Login1_UserName and Login1_Password are the asp IDs of the textboxes for username and password, and Login1_LoginButton is the submit button. Now upon post, I am getting back a page where there is a read asterisk next to the textboxes for username and password. So, I must have submitted it correctly, but without the username and password.
Can anyone help me out? How do I send the username and password?