I am new to programming and trying to create an application to login to a website and download a report automatically. I am stuck at the login part .

What i have so far:

Public Class Main

Private Property HtmlDocument As HtmlDocument

Private Property InptElmt As Object

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
WebBrowser1.Navigate("https://secure-ausomxjna.crmondemand.com/OnDemand/user/ReportIFrameView?SAWDetailViewURL=saw.dll?Go%26Path%3D%252fusers%252fvertafore%2523bbardorf%252fAll%2bOpen%2b-%2bFinancePro&AnalyticReportName=All+Open+-+FinancePro")
'Dim webbrowser1.navigate "https://secure-ausomxjna.crmondemand.com/OnDemand/user/ReportIFrameView?SAWDetailViewURL=saw.dll?Go%26Path%3D%252fusers%252fvertafore%2523bbardorf%252fAll%2bOpen%2b-%2bFinancePro&AnalyticReportName=All+Open+-+FinancePro"

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WebBrowser1.Document.GetElementById("j_username").SetAttribute("value", TextBox1.Text)
WebBrowser1.Document.GetElementById("j_password").SetAttribute("value", TextBox2.Text)

The problem is i cannot hit the sumbit button. It is actually not a button by a link that is hidden and calls a javascript function

The code on the site looks like the following:

<td></td>
<td style="padding-right:1px"><table border="0" width="300px" cellpadding="0" cellspacing="0"><tr><td style="width:22px"><input name="rememberMe" type="checkbox" checked="checked" onkeypress="return checkEnterLogon(event);" /></td>
<td class="logonFont">Remember My User ID</td>
<td align="right"><table border="0" cellpadding="0" cellspacing="0"><tr>
<td onmouseout="if(className!='disableLogonScreenButtonTD'){ className='logonScreenButtonTD'};;" onmouseover="if(className!='disableLogonScreenButtonTD'){ className='logonScreenButtonTD-inv'};;" class="logonScreenButtonTD" onclick="className='disableLogonScreenButtonTD';;">
<a href="javascript:void(0)" class="loginLink" onclick="checkPreSubmit (document.logonForm); return false;" onkeypress="return checkEnterLogon(event);">Sign In</a></td></tr></table></td></tr></table></td></tr></table>
<input name="redirect" type="hidden" value="$5$YElWh/hfwDFQKCUEpBnulvezB4CpfBGUv8pa6/qHEYhSDWbAc=;$5$8Oime/ECOdniC7kDRnyTaScOsTQ94KhlK7xpATL0jY+5K2TDAM8Y6CGQu4o4xttAmME+mNe1fenDw6oVIr7LNqoO+bHQ1H1+ThpBMxJmPQUrEb+fQO+T4VomJHxlRWgynWhEh0Ns0yTX+aqw/yjXpwmskqhSeg6BuQ0wJ1PFFd1tVIZ3KnsJLicXYxJpoZVdAidn9C1NhXodXZ7DScWuP/peu3u55Ct7u0FAB2boIR9I5AVLTYyDEwLnfeF+X38AfWssqOCJigIAur+3pmBMWPui2y8obMWKcj/xDLj3g83Dlq2uvdG4fKF+aq84EXTjOZHbMKRXrOaByQRrmF7rX9BDJylQ==" /><input name="langCode" type="hidden" value="enu" /></form></td></tr><tr><td style="padding-top:8px" align="center"><form name="forgotPwdForm" action="ForgotPassword" method="post"><table><tr><td>
<a href="javascript:void(0)" class="forgotPasswd" onclick="forgotPassword();return false;">Forgot Your Password?</a></td></tr></table><input name="j_username" type="hidden" /><input name="lang" type="hidden" value="enu" /></form></td></tr></table></center>
</td>