I'm in the process of converting over old coding to vb2005. The coding should login to the site, wait till execution is complete, then post to the post link page. I have some vb2005 coding below and under that my old working vb6 coding. so you can see from vb6 what i'm trying to do in vb2005

VB Code:
  1. Dim web As New System.Net.WebClient()
  2. Dim strPostData As String
  3.  
  4.         strPostData = "login_form_submit=1&admin=" + txtlogin.Text + "&password=" + txtPass.Text
  5.         web.Headers.Add("Content-Type", "application/x-www-form-urlencoded")
  6.         web.Headers.Add("Referer", "http://www.domain.com")
  7.  
  8.         Dim d As Byte() = System.Text.Encoding.ASCII.GetBytes(strPostData)
  9.         web.UploadData("http://www.domain.com/index.html", "POST", d)
  10.  
  11.         [B]'Code Needed: Wait till execution of (login) is complete.
  12.         'Code Needed: Goto and Open this page [url]http://www.domain.com/admin/updates.html[/url]
  13.         'Code Needed: Wait till execution of webpage is complete.[/B]

this is what i use to do in vb6

VB Code:
  1. Dim nUrl, strPostData As String
  2.         strPostData = "login_form_submit=1&admin=" + txtlogin.Text + "&password=" + txtPass.Text
  3. Inet.Execute "http://www.domain.com/index.html", "POST", _
  4. strPostData, "Content-Type: application/x-www-form-urlencoded" & vbCrLf _
  5. "Referer: http://www.domain.com" & vbCrLf
  6.  
  7.     Do
  8.         On Error GoTo Err:
  9.         DoEvents
  10.     Loop Until Inet.StillExecuting = False
  11.  
  12. nUrl = "http://admin.domain.com/?OPERATION=1&ADMIN="
  13.  
  14. Inet.OpenURL nUrl + txtSN.Text + "&SUBJECT=" + txtSub.Text _
  15. + "&MESSAGE=" + txtmsg.Text + "&POST.x=46&POST.y=5"
  16.  
  17.     Do
  18.         On Error GoTo Err:
  19.         DoEvents
  20.     Loop Until Inet.StillExecuting = False
  21.  
  22. Msgbox "Done!"