Weird problem w/webbrowser control

J. Scott Elblein

Well-known member
Joined
Dec 14, 2006
Messages
166
Location
Chicago
Programming Experience
10+
I have been using this code:

VB.NET:
Dim ControlSet As HtmlElement = wbr.Document.GetElementById(ControlName)
          
wbr.Document.GetElementById(ControlName).SetAttribute("Value", Value)

in a program without issue for some time now. For some reason today however, whenever I access the same page that it has always worked on, now gives me a NullReferenceException error on the .setattribute line.

I am noticing when I hover the cursor over ControlSet after the Dimming, it says "Nothing".

Anyone have any ideas why this could be happening? Thanks. :)
 
The solution was, i was being a big fat dummeh, lol :)

The site I was using it with, which hasn't changed a single thing as far as the login goes for years, suddenly changed the id name that i was looking for in order to fill in a form field. Been so long in fact that i just automatically assumed it had to be a coding problem on my end rather than something on their end.

I just replaced it with the newer one and was back in business. I didn't see any way to just delete my original post. :)
 
Back
Top