Home > Code > ASP.NET > How to set default first value as Select in dropdown control

How to set default first value as Select in dropdown control

by Thamil   on Nov 13, 2013   Category: ASP.NET   |  Views: 1274    |  Points: 25   |  Gold 


Below code shows how set Select as default value in dropdown control

ddlName.DataSource = dsName;
ddlName.DataTextField = "Name";
ddlName.DataValueField = "Name_Id";
ddlName.DataBind();
ddlName..Items.Insert(0, new ListItem("--- Select ---", string.Empty));




Post Code  |  Code Snippet Home

User Responses


No response found, be the first to review this code snippet.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts