how to check whether a dropdownlist contains particular value for the below code i have a value name
manager="manogar1"; if(mydropdownlist valuecontains the value "manogar") { } else { }
Hi Manogar,
You can Check value in Dropdownlist like below.
string manager = "manogar1"; if (!ddlDropdownList.Items.FindByValue(manager) != null) {
like this :
if (DropDownList1.Items.FindByValue("any value you wish to find") != null) { Response.Write("true"); }
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.