ASP Dropdown on Page_Load

KeaneM1976

New Member
I want to create a Drop Down using Aspx, which will list all the items contained in a data source but it will have an additional default value of "selected".In the aspx file, I have:\[code\]<aspx:DropDownList ID="ddl1" runat="server"/>\[/code\]In my aspx.cs file, I have a page_load, which contains:\[code\]protected void Page_Load(object sender, EventArgs e){ ddl1.DataSource = LocationofData; ddl1.DataBind();}\[/code\]And let's assume that LocationofData will populate the values "a,b,c,etc...". I want the default value to be "--selected--"How should I approach this? Thanks
 
Back
Top