View Full Version : Problem in getting selected value from dropdownlist when using Array as datasource

04-27-2006, 04:12 PM
Hi All,
I have used a string array as datasource for a dropdownlist. When getting the selected value from the dropdownlist in the postback, I am getting always the first value even though some other item is selected. Can any one help me to find a soultion for this problem? :confused:

04-27-2006, 06:03 PM
When you submit the page its posting back, rebinding the drop down list. Simple put "If Not IsPostBack then" into your page load, something like below.

Sub Page_Load()
If Not IsPostBack Then
Page Load Stuff
End If
End Sub

04-28-2006, 08:15 AM
how r u taking selected value from dropdownlist
try this