Guest User

Untitled

a guest
Sep 1st, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. Webbrowser.navigate fails to login the first time
  2. string username = "username";
  3. string password = "pass";
  4. string login = "login";
  5. string _urlLogin = "http:xxxxxxx";
  6. Uri _uriLogin = new Uri(_urlLogin);
  7. string _postData = "userName=" + username + "&pwd=" + password + "&loginTrue=" + login;
  8. byte[] data = Encoding.UTF8.GetBytes(_postData);
  9. webBrowser1.Navigate(_uriLogin, data, "Content-Type: application/x-www-form-urlencoded");`
Add Comment
Please, Sign In to add comment