Site Search:
Sign in | Join | Help
4Penny.net

ASP.NET

Notes, Tricks and Tips on ASP.NET Coding

Set a default item on a dropdownlist

Setting a default value on a dropdownlist seems like a simple thing to do... but I never have the exact code when I need it.

myDdl.Items.FindByValue("myDefaultValue").Selected = true

Comments

No Comments

About Steve Gray

Steve is a seasoned (translate: old) developer in VB and ASP.NET. He spends most of his time in Dynamics GP, writing custom mods for consulting firms. Crystal reports, eConnect, VS Tools for Dynamics... anything that comes along.