How to select item FindByValue DropDownList in wizardstep
Exception:
NullReferenceException
Object reference not set to an instance of an object.
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;
...
}
protected void Page_Load(object sender, EventArgs e)
{
…
}