Re: Retrieving form data from an asp page
- From: "Robert Bravery" <me@xxxxx>
- Date: Fri, 2 May 2008 12:19:44 +0200
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@xxxxxxxxxxxxxxxxHI 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
.
- References:
- Retrieving form data from an asp page
- From: Robert Bravery
- Re: Retrieving form data from an asp page
- From: Fernando Rodriguez, MCP
- Retrieving form data from an asp page
- Prev by Date: Re: LINQ and XML for compact framework
- Next by Date: How to Create an Organizational Chart using C#.NET ?
- Previous by thread: Re: Retrieving form data from an asp page
- Next by thread: Form SetDesktopLocation
- Index(es):
Relevant Pages
|