regarding viewstate

I

Irshad Ahmad

Hi,
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" >
<HTML>
<HEAD>
<title>Digicertify.com-Login</title>
<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"
name="vs_targetSchema">
</HEAD>
<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+hzlNUUBk1OBZE8b7exSs0NNbr/M=" />

<script language="javascript"
src="/aspnet_client/system_web/1_1_4322/WebUIValidation.js"></script>


<!--outer table-->
<table cellSpacing="0" cellPadding="0" border="0">
<tr>
<td width="50%"></td>
<td width="778">
<!--main table-->
<table borderColor="#cccccc" cellSpacing="0" cellPadding="0"
width="100%" align="center"
border="1">
<tr>
<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
file.
Apart from that i have disabled all view state properties.......

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

Kindly suggest me the remedy ........
thanks in advance.
regards
Irshad Ahmad.
 
W

Walter Wang [MSFT]

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?
http://scottonwriting.net/sowblog/posts/1608.aspx

Hope this helps.


Regards,
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top