Sorry lines were messed up:
Response.Write("Post variables: <br/>");
foreach (string key in Request.Form)
{
Response.Write(String.Format("{0} = {1} <br/>", key,
Request.Form[key]));
}
Response.Write("Get variables: <br/>");
foreach (string key in Request.QueryString)
{
Response.Write(String.Format("{0} = {1} <br/>", key,
Request.QueryString[key]));
}
"Shkedy" <sh****@newsgroups.nospamwrote in message
news:eV**************@TK2MSFTNGP03.phx.gbl...
Make sure your original form is properly coded.
To make sure the values are working You can check what values you are
submitting by running these few lines of code in the form load event:
Response.Write("Post variables: <br/>"); foreach (string key in
Request.Form) {
Response.Write(String.Format("{0} = {1} <br/>", key,
Request.Form[key])); } Response.Write("Get variables: <br/>"); foreach
(string key in Request.QueryString) {
Response.Write(String.Format("{0} = {1} <br/>", key,
Request.QueryString[key])); }
Sagi
Technical Blog
http://blog.shkedy.com
>>I have an html form that posts onto an asp.net page (vs2005).
The form header is as follows: <form action="thankyou.aspx"
method="post">.
In a table i have the fields <td><input id="email" type="text"
runat="server" /></tdand a submit button.
In the asp.net page, how do i get the values of the posted form ?
Thanks