469,338 Members | 8,616 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,338 developers. It's quick & easy.

regarding viewstate

I am developing an Web application in ASP.NET with C# .when i run the
project on local machine i.e localhost the default page get loaded.
when i view its source code i get :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="C#" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<LINK href="/images/StyleSheet.css" type="text/css" rel="stylesheet">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
<body MS_POSITIONING="GridLayout">
<form name="Form1" method="post" action="login.aspx" language="javascript"
onsubmit="ValidatorOnSubmit();" id="Form1">
<input type="hidden" name="__VIEWSTATE"
value="dDwxMjgzOTMxODMzOzs+hzlNUUBk1OBZE8b7exSs0NN br/M=" />

<script language="javascript"
<!--outer table-->
<table cellSpacing="0" cellPadding="0" border="0">
<td width="50%"></td>
<td width="778">
<!--main table-->
<table borderColor="#cccccc" cellSpacing="0" cellPadding="0"
width="100%" align="center"
<td width="100%">
<!--header table-->

My problem is that how can we remove the tag that follows in the above
source code i.e.the view state tag should not appear in the html source
Apart from that i have disabled all view state properties.......

<input type="hidden" name="__VIEWSTATE"
value="dDwxMjgzOTMxODMzOzs+hzlNUUBk1OBZE8b7exSs0NN br/M=" />

Kindly suggest me the remedy ........
thanks in advance.
Irshad Ahmad.
Jun 9 '06 #1
1 1047
Hi Irshad,

Thank you for your post.

Based on my understanding, the question is: Why the hidden field
__VIEWSTATE is still generated while ViewState is disabled? If I've
misunderstood anything, please feel free to post here.

Scott Mitchell has an exact excellent article on this question:

#Question: I set my page's EnableViewState property False; why is there
still a __VIEWSTATE hidden form field?

Hope this helps.
Walter Wang
Microsoft Online Community Support

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

This posting is provided "AS IS" with no warranties, and confers no rights.

Jun 9 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by aroraamit81 | last post: by
reply views Thread by Amrit | last post: by
reply views Thread by alagan | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.