How are you getting the data from the HTML page?, you said is just
name/value pairs, does it have any HTML or just the list of
name=value&name2=value2&name3=value3?
If your getting it that way then you don't even need to decode it into a
string, you can just store it in a byte array and then pass it to the
UploadData method of the webclient.
If it's on ony other format, then just parse it into that format:
name1=value1&name2=value2.... (just like a URL querystring but without the
leading ?) , then encode it into binary and pass it to the WebClients
UploadData method as follows:
UploadData(
http://tagetsite.com/targetpage.aspx, "POST", encodedBytes).
Hope that helps,
Fernando L Rodriguez, MCP
"Robert Bravery" <me@u.comwrote in message
news:8E**********************************@microsof t.com...
HI all,
I retrive an response from an aspx page and store the resultant html into
an string object like:
string response = Encoding.UTF8.GetString(responseBytes);
this html page has form data in it, name value pairs. I need to get this
data and post it to another aspx page.
I know I can use webclient to post the formdata, but how do I get that
into a NameValueCollection so I can post it to another aspx page
Thanks
Robert