Microsoft
Software
Hardware
Network
Question : Default selected item for drop down list box
Hello guys,
I am new to asp.net I am not trying to achieve anythign fancy but just trying to set default selected value for one of the dropdown that I am using. for that I am doing Items>selected= true for whatever item I want selected when i load the page. In my case, it is a month dropdows and I am selecting date 14 as selected default value out of all 30 values but somehow, out of the blue .NEt decides to show me 29 instead of 14. I am not sure if there is some another setting that is overwritting this value.
Any ideas?
Answer : Default selected item for drop down list box
Probably something like:
DropDownList.DataBind()
DropDownList.SelectedIndex
= 3
But you may need list count...
See also:
http://www.velocityreviews
.com/forum
s/t75681-d
ropdown-li
st-
default
-selected-
item.html
or
http://forums.asp.net/t/12
19729.aspx
Random Solutions
Why would Internet Explorer 8 not allow Google, Bing and Yahoo search web pages to open?
Button control not clicking in some environments
Wordpress on Godaddy Free Hosting
ODB-II tool recommendation needed.
receiving a few hundred Spam messages
Slow powershell script....any way to speed it up?
PHP/AJAX: Checking to see if loaded content has changed since last time
Passed parameter used in select statement where column like the passed parameter
Unable to install Office 2007
Database icon with "Group similar taskbar buttons"