How do i get the combo box value from my web-form and insert it into Database with SQL?
(For example country name from countries combo box)
In other words.. How can i store the selected value in combo-box in variable ?
I tried Request.Form["countries"] but no success
I also tried:
countries.SelectedItem.Value
but it is not working in CodeFile
protected void Page_Load(object sender, EventArgs e)
{
string country = countries.SelectedItem.Value;
}
(For example country name from countries combo box)
In other words.. How can i store the selected value in combo-box in variable ?
I tried Request.Form["countries"] but no success
I also tried:
countries.SelectedItem.Value
but it is not working in CodeFile
protected void Page_Load(object sender, EventArgs e)
{
string country = countries.SelectedItem.Value;
}