0
我有createuserwizard控件,它有4個步驟。當qeurystring中存在一些參數時,我想在步驟0中將它們設置爲contols,然後將activeindex設置爲下一步。我不喜歡這樣寫道:通過asp.net中QueryString中的參數在CreateUserWizard中設置步驟
if (!Page.IsPostBack)
{
if (!String.IsNullOrEmpty(Request["from"]) && !String.IsNullOrEmpty(Request["to"]) && !String.IsNullOrEmpty(Request["seek"]) && !String.IsNullOrEmpty(Request["livein"]))
{
((DropDownList)RegisterUser.WizardSteps[0].FindControl("ddlGender")).SelectedValue = Request["seek"];
((TextBox)RegisterUser.WizardSteps[0].FindControl("txtAgeFrom")).Text = Request["from"];
((TextBox)RegisterUser.WizardSteps[0].FindControl("txtAgeTo")).Text = Request["to"];
((DropDownList)RegisterUser.WizardSteps[0].FindControl("ddlLive")).SelectedValue = Request["livein"];
RegisterUser.ActiveStepIndex = 1;
}
}
這工作,並設置當前步驟糾正一步,但問題是「上一步」按鈕不起作用,並沒有轉到步驟0