THis would be something similar to what you are looking for..if anyone sees
any mistakes feel free to chime in.
Public Sub SubmitForAndy
Dim formData As String
Dim uri As Uri
uri = New Uri(txtAddress. Text)
Dim httpReq As HttpWebRequest = DirectCast(WebR equest.Create(u ri),
HttpWebRequest)
formData = "username=" & txtUsername.Tex t & "&password= " &
txtPassword.Tex t
httpReq.AllowAu toRedirect = True
httpReq.Method = "POST"
httpReq.Content Type = "applicatio n/x-www-form-urlencoded()"
httpReq.Content Length = formData.Length
Dim sw As New StreamWriter(ht tpReq.GetReques tStream)
sw.Write(formDa ta)
sw.Close()
End Sub
Gary Townsend.
"andy" <an**@northwave s.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
Hi
I have a requirement to submit form data to a url after collecting the
data from the database.
For example I need to send firstname and lastname through a post method
I can call on the fly.
This is the traditional route below , I want to emulate this submit
action from a vb.class using request.method= "post"
<FORM action="http://somesite.com/prog/adduser" method="post">
First name: <INPUT type="text" name="firstname "><BR>
Last name: <INPUT type="text" name="lastname" ><BR>
email: <INPUT type="text" name="email"><B R>
<INPUT type="submit" value="Send"> <INPUT type="reset">
</FORM>
clear as mud?
Anyone have any tips ?