如何在向导步骤中选择项 FindByValue DropDownList
例外:
NullReferenceException
对象引用未设置为对象的实例。
C#:
protected void Page_Load(object sender, EventArgs e)
{
...
DropDownList DropDownList2 =
(DropDownList)Wizard1.WizardSteps[1].FindControl("DropDownList1");
DropDownList2.Items.FindByValue(
DataSetLoad.Tables[1].Rows[0]["a"].ToString()).Selected = true;
...
}