Dear ASP.NET Programmers,<BR><BR>How can I post data to an ASP.NET login page and pass authentication? The login page uses forms authentication, users must supply usernames and password and have to click on a submit button. I want to automate this process by supplying values with HttpWebRequest and then download a file on the site. I think that I cannot invoke the submit button. Pleeeasee help, thanks in advance<BR><BR> Dim myWebReq As HttpWebRequest<BR> Dim myWebResp As HttpWebResponse<BR> Dim encoding As New System.Text.ASCIIEncoding()<BR> Dim postData As String<BR> Dim data() As Byte<BR> Dim sr As StreamReader<BR> Dim sw As StreamWriter<BR><BR> postData += "txtUsername=b"<BR> postData += "&"<BR> postData += "txtPassword=k"<BR> data = encoding.GetBytes(postData)<BR> myWebReq = WebRequest.Create("http://burak/database/medicalDocs/F325_fittoflyreport.aspx")<BR> myWebReq.Method = "POST"<BR> myWebReq.ContentType = "application/x-www-form-urlencoded"<BR> myWebReq.ContentLength = data.Length<BR> Dim myStream As Stream = myWebReq.GetRequestStream()<BR> myStream.Write(data, 0, data.Length)<BR> myStream.Close()<BR> myWebResp = myWebReq.GetResponse<BR> sr = New StreamReader(myWebResp.GetResponseStream)<BR> Dim strHTML As String = sr.ReadToEnd<BR> sw = File.CreateText("d:Downloads1.htm")<BR> sw.WriteLine(strHTML)<BR> sw.Close()<BR> Response.WriteFile("d:Downloads1.htm")