F
Francis
Hi,
i'm testing ViewState with this page here below:
i tried with EnableViewState="false" and with EnableViewState="true", but
the produced source code is the same in both cases. I would expect here no
hidden" name="__VIEWSTATE in the source because of 'false' ...
If someone could explain this.
Thanks
Francis
aspx page:
<%@ Page Language="VB" EnableViewState="false" AutoEventWireup="false"
CodeFile="Default.aspx.vb" Inherits="_Default" %>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</div>
</form>
source code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
Untitled Page
</title></head>
<body>
<form name="form1" method="post" action="Default.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUJMjgzMDgzOTgzZGRuyJfSk1ZKnyyyXSj8ebdYy31LDA==" />
</div>
<div>
<input name="TextBox1" type="text" id="TextBox1" />
</div>
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
value="/wEWAgLl5ZHgCQLs0bLrBohnJoqsGn5BNs4p/EWSTVSTTRel" />
</div></form>
</body>
</html>
i'm testing ViewState with this page here below:
i tried with EnableViewState="false" and with EnableViewState="true", but
the produced source code is the same in both cases. I would expect here no
hidden" name="__VIEWSTATE in the source because of 'false' ...
If someone could explain this.
Thanks
Francis
aspx page:
<%@ Page Language="VB" EnableViewState="false" AutoEventWireup="false"
CodeFile="Default.aspx.vb" Inherits="_Default" %>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</div>
</form>
source code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
Untitled Page
</title></head>
<body>
<form name="form1" method="post" action="Default.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUJMjgzMDgzOTgzZGRuyJfSk1ZKnyyyXSj8ebdYy31LDA==" />
</div>
<div>
<input name="TextBox1" type="text" id="TextBox1" />
</div>
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
value="/wEWAgLl5ZHgCQLs0bLrBohnJoqsGn5BNs4p/EWSTVSTTRel" />
</div></form>
</body>
</html>