I getting this error: an unhandled exception of type 'system.nullreferenceexception' occurred
I trying to build a auto updater for some website.. This web not have a Form tag it's working with java script. What the code needs to do it's to get into the site automatic.
In this code:
HtmlElementCollection elc = webBrowser1.Document.GetElementsByTagName("input");
foreach (HtmlElement el in elc)
{
if (el.GetAttribute("type").Equals("button"))
{
el.InvokeMember("Click");
}
if (el.GetAttribute("type").Equals("text"))
{
el.SetAttribute("value", textBox2.Text);
}
if (el.GetAttribute("type").Equals("password"))
{
el.SetAttribute("value", BaseString + Match[Count]);
}
}
What I need to do? Thanks