Ramco Ramco

Ramco Ramco

  • 442
  • 3.4k
  • 515.5k

DropDown List

Nov 1 2022 3:48 PM

Hi

  I have below code . I want to set default value whose Status is 0. How it can be done

List<View_Student> objResult = bALStudent.GetStudentDetails(Convert.ToInt32(hdfStudentID.Value));
                    if (objResult != null)
                    {
                        ddlStudent.DataTextField = "Name";
                        ddlStudent.DataValueField = "ID";
                        ddlStudent.DataSource = objResult;
                        ddlStudent.DataBind();
                    }

Thanks


Answers (2)