I have a DropDownList trying to bind to DbNull and it’s not happy about it. I’ve seen advice about creating a ListItem with value=” ” but this isn’t working.
Any help would be much appreciated.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
if you want to add default value to dropdwon list you can do it as below
Edit
if you know some values of the datasouce is null than y dont you filter out those value at database level and than bind soruce with the drop down.
or
make use of
Isnull()in query and assing default value to null values.