I have a dropdownlist with values -1,1,2 and text A,B,C i wanna set B as selectedValue by default when the page is loaded.
Something which can be done at the Page Level i.e in aspx or ascx.
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.
You need to specify “selected” attribute of html “select” tag.
One option is – render select tag on your own.
Second – make sure that you form correct SelectItemList (‘datasource’ for your dropdownlist) – it must contain one item with .Selected=true.