Submit html form via Window form
<p>I need to automize login process of a widsite.
After googling for a while, I wrote this code.
But the problem is after running this code, no errors, no output.
I am unable to know where I went wrong.</p>

<pre><code>private void Form1_Load(object sender, EventArgs e)

        {
            WebBrowser browser = new WebBrowser();
            string target = "http://authcisco/auth.html";
            browser.Navigate(target);
            browser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(Credentials);   
}
private void Credentials(object sender, WebBrowserDocumentCompletedEventArgs e)

        {
            WebBrowser b = (WebBrowser)sender;
            b.Document.GetElementById("userName").SetAttribute("value", "shyam");
            b.Document.GetElementById("pass").SetAttribute("value", "shyam");
            b.Document.GetElementById("Submit").InvokeMember("click");  

        }  
</code></pre>

<p>Thank You.</p>
