9 January 2014

Set the selected item in an ASP.NET dropdown via the display text

Set the selected item in an ASP.NET dropdown via the display text

Method 1:
ddlItemdetails.Items.FindByText("Shirts").Selected = true;

Method 2:

ddlItemdetails.SelectedValue = ddItems.Items.FindByText("Shirts").Value;


No comments:

Post a Comment

Comments Welcome

Benefits of microservices

Benefits of microservices      1. Development & Team Agility Architecture- and language-neutral: Teams aren't locked into one progr...