title: Filling Online form with vb.net coding
body: <p>I want to fill a form programatically by vb.net 2008 coding.Form is on the third page of a website. i am using the following code</p>
  
  <pre><code>Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
  
      Dim allelements As HtmlElementCollection = WebBrowser1.Document.All
      Dim txti As HtmlElement = WebBrowser1.Document.GetElementById("txtId")
      Dim txtp As HtmlElement = WebBrowser1.Document.GetElementById("txtPsw")
      Dim txti1 As HtmlElement = WebBrowser1.Document.GetElementById("txtId1")
      Dim txtd As HtmlElement = WebBrowser1.Document.GetElementById("txtDate")
      Dim txtr As HtmlElement = WebBrowser1.Document.GetElementById("txtRegion")
      Dim txte As HtmlElement = WebBrowser1.Document.GetElementById("txtEmail")
      Dim txtt As HtmlElement = WebBrowser1.Document.GetElementById("txtTitle")
      Dim txtu As HtmlElement = WebBrowser1.Document.GetElementById("txtUrl")
      Dim txtp1 As HtmlElement = WebBrowser1.Document.GetElementById("txtPin1")
      Dim txtp2 As HtmlElement = WebBrowser1.Document.GetElementById("txtPin2")
      Dim txtp3 As HtmlElement = WebBrowser1.Document.GetElementById("txtPin3")
      Dim txtp4 As HtmlElement = WebBrowser1.Document.GetElementById("txtPin4")
      Dim txtp5 As HtmlElement = WebBrowser1.Document.GetElementById("txtPin5")
      Dim txtpd As HtmlElement = WebBrowser1.Document.GetElementById("txtData")
  
      txti.SetAttribute("value", "E712050-15")
      txtp.SetAttribute("value", "HH29")
  
  
  
      txti1.SetAttribute("value", "E712050-15")
      txtd.SetAttribute("value", "")
      txtr.SetAttribute("value", "PAKISTAN")
      txte.SetAttribute("value", "excitedreams@yahoo.com")
      txtt.SetAttribute("value", "Best Classified Business.")
      txtu.SetAttribute("value", "// www.craigslist.org /")
      txtp1.SetAttribute("value", "W")
      txtp2.SetAttribute("value", "X")
      txtp3.SetAttribute("value", "M")
      txtp4.SetAttribute("value", "A")
      txtp5.SetAttribute("value", "F")
  </code></pre>
  
  <p>End Sub</p>
  
  <p>But my code is unable to fill it. It seems that code is works on 1st page of the website but not working on the 3rd page . How to make it able to fill the form ?? Thanks Alot</p>