I have a form in which I have several inputs, when I submit the form to process the information, when I try to read them I can't.
This is the form:
<form id="form1" action="page.aspx" method="get">
<input type="text" name="idP" id="idP" value="123456789" />
...
</form>
Then when I send it to "page.aspx" The url show the data:
localhost/page?idP=123456789
But when I try to read them from code as:
string[] keys = Request.Form.AllKeys;
for (int i = 0; i < keys.Length; i++)
{
Response.Write(keys[i] + ": " + Request.Form[keys[i]] + "<br>");
}
It doesn't print anything, and AllKeys shows as 0 values, I tried with "Post" method as well but nothing.
What I'm doing wrong?