Variable State Information in web form script

carteltestcarteltest Posts: 2
edited March 7, 2007 4:53AM in ANTS Load
Hello. I am having difficulty modifying my recorded script to take State Information and make variable input for a web form.

My recorded script is:
WebClient.HttpRequest.Pragma = "no-cache"
WebClient.HttpRequest.ContentType = "multipart/form-data; boundary=
7d72114510340"
WebClient.HttpRequest.SetPostData(System.Text.Encoding.ASCII.GetBytes( _
"
7d72114510340" & _
vbCrLf & _
"Content-Disposition: form-data; name=""ctl00$MainContent$SingleOrder1$txtAddress""" & vbCrLf & _
"" & vbCrLf & _
"700 Test Street" & vbCrLf & _
"
7d72114510340" & _
"" & vbCrLf & _
"Content-Disposition: form-data; name=""ctl00$MainContent$SingleOrder1$txtCity""" & vbCrLf & _
"" & vbCrLf & _
"Denver" & vbCrLf & _

The data I want to take for State Information is street address (seen here as 700 Test Street and city name (seen here as Denver)

Please advise.
Regards.

Comments

  • Hi,

    create 2 columns street_no and city in stae info table

    dim street as string = stateinformation.get("street_no")
    dim street as string = stateinformation.get("city")

    where you find this "700 Test Street" replace with street
    where you find this "denver" replace with city

    if you want put me.logtofile(street & " " & city) check in Ants trace log file under C:\program files\ANTS Load directory.
    Thanks,
    Guru
Sign In or Register to comment.