【发布时间】:2016-09-15 04:41:25
【问题描述】:
如果我设置EnableViewState="false",那么在使用控件时回发后也会维护输入数据
- 文本框
- 单选按钮
- 复选框
- 等
所以我只是想知道一些内部问题,如果EnableViewState="false" 那么当我们使用文本框、单选按钮复选框等控件时,输入数据在回发后如何维护。请讨论内部问题。
谢谢。
这是我的 aspx 代码
<%@ Page Language="C#" AutoEventWireup="true" EnableViewState="false" CodeBehind="WebForm2.aspx.cs" Inherits="WebApplication1.WebForm2" %>
<asp:TextBox ID="TextBox1" runat="server"
style="position: relative; top: 0px; left: 0px;"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"
style="position: absolute; top: 66px; left: 11px; z-index: 1;"></asp:TextBox>
<asp:RadioButton ID="RadioButton1" runat="server" style="position: relative" />
<asp:CheckBox ID="CheckBox1" runat="server" style="position: relative" />
<asp:Button ID="Button1" runat="server" Text="Button" />
</div>
</form>
【问题讨论】:
-
我有一些参考和示例的更新答案。您有什么建议/问题吗?