|
protected void Page_Load (object sender, EventArgs e)
{
string recive_id, recive_age;
recive_id = Request.Form ["id"]; // Wrong here, Form ["name"]
recive_age = Request.Form ["age"]; // Yes, here is the ID value of the control that needs to be accessed
Response.Write ("My name =" + recive_id + "<br>" + "My age =" + recive_age + "<br>");
// 3\
Response.Write ("You are using" + Request.RequestType + "Method to pass data");
}
If you post to this page, use recive_id = name.Text; more convenient. |
|