Process of posting data to the server and retrieving values sent.
Retrieve Form Values:
To retrieve the values from a runat server form:
Control |
Retrieve value |
<asp:textbox id=”txtName” runat=”server” text=””/> |
txtName.text |
<asp:checkbox id=”cbName” runat=”server” text=”HTML”/> |
cbName.text |
<asp:dropdownlist id=”ddlName” runat=”server”> |
ddlName.SelectedItem.Text or ddlName.SelectedItem.Value |
To retrieve form values sent from another page:
Form Type |
Retrieve value |
<form action=”getvalues.aspx” method=”post”> |
Request.Form(“txtName”) |
<form action=”getvalues.aspx” method=”get”> |
Request.QueryString(“txtName”) |