I have a combo box and i want to pass its values to open a connection.
To extract values from combo box my freind suggessted me to use Request.querystring("comboname")
but this could be used only when i pass values to the url.
is there any other way to extract the value from combo box
You are right Request.QueryString would be used when you want to get a value from URL. To use your combobox value use DropDownList1.SelectedItem.Text (to get a text) orDropDownList1.SelectedItem.Value (to get value).
Cheers
Ritesh
In addition to the above approach, if you are posting the form then the value of drop down list can be accessed by Request.form("NameofControl"), convert the values as per your requirement.
0 comments:
Post a Comment