I have an asp:Wizard in my Webforms application:
<WizardSteps>
<asp:WizardStep ID="WizardStep1" runat="server" StepType="Start" Title="a">
<asp:TextBox ID="TextBox1" runat="server" Enabled="True"></asp:TextBox>
</asp:WizardStep>
<asp:WizardStep ID="WizardStep2" runat="server" StepType="Complete" Title="b">
</asp:WizardStep>
</WizardSteps>
Now i want to access in the next step a value the user has entered in the TextBox1. In
Wizard1_NextButtonClick
i have access to the TextBox1.text, but the value the user entered is not in the text property. There is still the initial value? How can i access the value the user has entered? Viewstate of Wizard and Wizardsteps are enabled.
solution:
My fault was, that i set the TextBox1.Text on every Page_Load again to initial value. I didn’t know that this event is fired by the Wizard next button.
So simple solution was to add an if case which asks for the PostBack state of the page
i have solved the problem by myself. My fault was, that i set the TextBox1.Text on every Page_Load again to initial value. I didn’t know that this event is fired by the Wizard next button.
So simple solution was to add an if case which asks for the PostBack state of the page: