I'm submitting a form and need to collect the data.
Following this example, I'm trying to retrieve the value I selected in a select box.
The problem is, the select box does not have the attribute 'name'.
<asp:DropDownList runat="server" ID="countySelect" CssClass="ddlCountySelect" DataValueField="kommunekode" DataTextField="kommune" ></asp:DropDownList>
How can I then retrieve its selected value?
This is the code I'm trying to use:
if (Request.Form.Count > 0)
lblTest.Text = Convert.ToString(Context.Request.Form["countySelect"]);
else
lblTest.Text = "nada";
The result is blank.