Xignal76
asked on
How to set focus to a textbox in a C# Wizard step inside an UpdatePanel
Tried many methods to place the cursor in a textbox in Wizard steps in a VS 2005 Wizard control. The control is inside an UpdatePanel. I can use a FindControl to identify the control successfully but the focus always defaults to the Step's Next button. My most recent code attempt is below. Suggestions?
//Called from an OnPreRender = "Wizard1_PreRender" statement in asp:Wizard
protected void Wizard1_PreRender(object sender, EventArgs e)
{
if (Wizard1.ActiveStep.Name == "Step 2")
{
TextBox textbox = (TextBox)Wizard1.FindControl("txtUserFirstName");
Page.SetFocus(textbox);
}
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER