Results 1 to 20 of 20

Thread: [RESOLVED] [2005] NullReference was unhandlded

Threaded View

  1. #1

    Thread Starter
    Banned
    Join Date
    May 2008
    Posts
    461

    Resolved [RESOLVED] [2005] NullReference was unhandlded

    Hi guys

    I am having problem to fills the text on each textbox in the webpage. I did get one textbox to fill only, not for others. When I attempt to fill the texts in two textbox at the same time, I get the error.



    Error:
    NullReference was unhandlded
    Object reference not set to an instance of an object.




    Code:
           Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            WebBrowser1.Document.Forms(0).All("Username").SetAttribute("value", "fake")
            WebBrowser1.Document.Forms(0).All("Password").SetAttribute("value", "password")
            WebBrowser1.Document.Forms(0).All("Confirm Password").SetAttribute("value", "password")
            WebBrowser1.Document.Forms(0).All("Email Address").SetAttribute("value", "[email protected]")
            WebBrowser1.Document.Forms(0).All("Confirm Email Address").SetAttribute("value", "[email protected]")
            WebBrowser1.Document.Forms(0).InvokeMember("submit")
        End Sub


    I don't understand it as it should work in the first place so please can you help me to get this fix??




    Thanks,
    Mark
    Last edited by Mark107; Aug 19th, 2008 at 01:18 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width