Hi Brian,
Sorry for misunderstanding the problem and thank for your followup. As for
handling the post form a normal html page. I think there is nothing
different, just retrieve the certain html element(such as input field)'s
value via its name attribute
#note via "name" not "id"
for example if we submit a html page like following:
<form action="WebForm1.aspx" method="post">
<table width="100%" align="center">
<tr>
<td>
FirstName:<INPUT id="txtFirstName" type="text" name="txtFirstName">
</td>
</tr>
<tr>
<td>
LastName:<INPUT id="txtLastName" type="text" name="txtLastName">
</td>
</tr>
<tr>
<td>
Email:<INPUT id="txtEmail" type="text" name="txtEmail">
</td>
</tr>
<tr>
<td>
<INPUT id="Submit1" type="submit" value="Submit" name="Submit1">
</td>
</tr>
</table>
</form>
Then, in WebForm1.aspx, we can handled this in Page_Load event as below:
private void Page_Load(object sender, System.EventArgs e)
{
Response.Write("<br>FirstName: " + Request.Form["txtFirstName"]);
Response.Write("<br>LastName: " + Request.Form["txtLastName"]);
Response.Write("<br>Email: " + Request.Form["txtEmail"]);
}
or you can use the foreach loop to loop through all the form datas in the
request:
foreach(string key in Request.Form.Keys )
{
Response.Write("<br>" + key + " : " + Request.Form[key]);
}
Hope helps. Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx