Tuesday, December 20, 2022

How to add blank value to 0th index of Dropdown list ASP.NET c#

  public void BindCadreTypeDropdownlist()

        {

            DataSet ds = new DataAccess().Read("read_cadreType");

            ddlCadreType.DataSource = ds.Tables[0];

            ddlCadreType.DataBind();

            ddlInstitute.Items.Insert(0, new ListItem("--Select--", "--Select--"));

        }

No comments:

Post a Comment