关于gridview的enableviewstate的问题!
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ApplicationId,LoweredRoleName" DataSourceID="SqlDataSource1" EnableViewState="false"><Columns>
<asp:BoundField DataField="ApplicationId" HeaderText="ApplicationId" ReadOnly="True"
SortExpression="ApplicationId" />
<asp:BoundField DataField="RoleId" HeaderText="RoleId" SortExpression="RoleId" />
<asp:BoundField DataField="RoleName" HeaderText="RoleName" SortExpression="RoleName" />
<asp:BoundField DataField="LoweredRoleName" HeaderText="LoweredRoleName" ReadOnly="True"
SortExpression="LoweredRoleName" />
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
</Columns>
</asp:GridView>
……………………………………
……………………………………
<asp:Button ID="Button2" runat="server" Text="Add1" OnClick="Button2_Click" />上面是我的代码,我在点击按钮以后为什么gridview中的数据还有啊……。不是EnableViewState="false"后viewstate就不能保存提交前的数据了吗?我的Page的EnableViewState也设置为false了。