Re: Retrieving form data from an asp page

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Thanks Guys,

I think I got that one working, now on to the next problem. HopefullI can get some more answers from here

Robert

"Fernando Rodriguez, MCP" <frodriguez@xxxxxxxxxxxxxxxxx> wrote in message news:OsT33M$qIHA.1164@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxx> wrote in message news:8E999CB3-7099-41BA-A263-CE25D668F7D9@xxxxxxxxxxxxxxxx
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





---
avast! Antivirus: Inbound message clean.
Virus Database (VPS): 080501-0, 01/05/2008
Tested on: 02/05/2008 12:18:23 PM
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com




.



Relevant Pages

  • Re: calls and code behind / response.write confusion
    ... I think perhaps I am missing some fundemental understanding of the relation between the aspx and it's code behind file. ... Thus returning a string to the exact point in my html that I desired it. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Retrieving form data from an asp page
    ... How are you getting the data from the HTML page?, ... string, you can just store it in a byte array and then pass it to the ... UploadData method of the webclient. ... I retrive an response from an aspx page and store the resultant html into ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: You need to identify the objects on the web page that have the values entered.
    ... Function ZipPlusFour(sAdd1 As String, _ ... Dim sResult As String ... Take the html text and put it in a file called ...
    (microsoft.public.excel.programming)
  • Re: getAttribute question
    ... oddity with IE that getAttributereturns an empty string if the ... HTML specification, ... appropriate places in the HTML 4 and DOM HTML specifications. ...
    (comp.lang.javascript)
  • Re: [PHP] generating an html intro text ...
    ... You would have to search out and pull in all closing tags. ... grab 256 characters -- The string. ... html markup should not go towards the string length count, ...
    (php.general)