jfsedlar3rd
asked on
asp.net Dropdown list no selected item in code behind.
I have been beating my head on the desk. I am writing a asp.net app in Visual Studio 2010 I filled a dropdown list via a SQL 2008 table the same way i do in Visual Studio 2008. The ddl populates fine however when I punch a save button the selected value is not available in the code behind. I am using master pages.
On click your page gets post back so it will again populate your dropdown so you won't get selected value of the same. You can place the control in Updatepanel which will stop page postback and you get control's value
ASKER
Why have I not seen this functionality in the past? is there something not configured right with my viewstate?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Duh I forgot the If Not IsPostBack. Thanks a lot.