我有一个用户控件附加到向导控件的向导步骤之一。问题是当我单击下一个和上一个按钮时值丢失了。任何帮助如何使用 jquery 保留值?
网页表格
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div>
<asp:Wizard ID="Wizard1" runat="server" HeaderText="Simple Example of Wizard Control" HeaderStyle-Font-Size="Larger" HeaderStyle-ForeColor="Crimson" OnFinishButtonClick="Wizard1_FinishButtonClick" OnNextButtonClick="Wizard1_NextButtonClick">
<WizardSteps >
<asp:WizardStep ID="WizadStep1" runat="server" title="Personal Information" >
<asp:Label ID="Label1" runat="server" Text="Your Name" AssociatedControlID="TextBox1"></asp:Label>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<asp:Label ID="Label2" runat="server" Text="City" AssociatedControlID="TextBox2"></asp:Label>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</asp:WizardStep>
<asp:WizardStep ID="WizardStep2" runat="server" title="Favorite Color?">
<asp:Label ID="Label3" runat="server" Text="Favorite Color?" AssociatedControlID="RadioButtonList1"></asp:Label>
<asp:RadioButtonList ID="RadioButtonList1" runat="server">
<asp:ListItem Selected="True">Red</asp:ListItem>
<asp:ListItem>Green</asp:ListItem>
<asp:ListItem>Blue</asp:ListItem>
</asp:RadioButtonList>
</asp:WizardStep>
<asp:WizardStep ID="WizardStep3" runat="server" title="Favorite Tool?">
<asp:Label ID="Label4" runat="server" Text="Most Favorite?" AssociatedControlID="RadioButtonList2"></asp:Label>
<asp:RadioButtonList ID="RadioButtonList2" runat="server">
<asp:ListItem Selected="True">Asp.Net</asp:ListItem>
<asp:ListItem>ColdFusion</asp:ListItem>
<asp:ListItem>PHP</asp:ListItem>
</asp:RadioButtonList>
<uc1:WebUserControl1 runat="server" id="WebUserControl1" />
</asp:WizardStep>
<asp:WizardStep ID="WizardStep4" runat="server" Title="Result" OnActivate="WizardStep4_Activate">
<asp:Label ID="Label5" runat="server" Font-Size="X-Large" ForeColor="DarkGoldenrod"></asp:Label>
</asp:WizardStep>
</WizardSteps>
</asp:Wizard>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</form>
用户控制
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WebUserControl1.ascx.cs" Inherits="WebApplication2.WebUserControl1" %>
<div class="clear"></div>
<div>
<ul>
<li><input type="checkbox"/><span id="0">Column1</span></li>
<li><input type="checkbox"/><span id="1">Column 2</span></li>
<li><input type="checkbox"/><span id="2">Column 3</span></li>
</ul>
</div>