在下拉列表中选择索引更改我想根据条件绑定下拉列表。我正在这样做并且数据显示我是否使用断点但前端下拉列表未绑定。它显示为空白。我的代码如下:
SqlParameter[] param6 = new SqlParameter[]
{ new SqlParameter("@status","drivershow"),
new SqlParameter("@FromDateWithStartTime",driverdate),
new SqlParameter("@dayvalue",dayvalue),
};
List<clsDropDown> assigneddriver = comnFunctionObj.getDropDownList(clsConstant.SP_GET_CAR_BOOKING_STATUS, param6);
ddldriver.Items.Clear();
for (int i = 0; i < assigneddriver.Count; i++)
{
if (!ddldriver.Items.Contains(new ListItem(assigneddriver[i].DisplayFieldText.Trim(), assigneddriver[i].ValueFieldText.Trim())))
{
ddldriver.Items.Add(new ListItem(assigneddriver[i].DisplayFieldText.Trim(), assigneddriver[i].ValueFieldText.Trim()));
}
}