473,405 Members | 2,415 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

delete viewstate from my aspx result pages?

I'd like to optimize my aspx pages for Search Engines like google. One thing
I have to do is to minimize or delete the viewstate hidden input field. I'm
using user controls, so in both pages and user controls I considered the tag:
EnableViewState="False". The problem is that viewstate is still in the result
pages.

How can I delete viewstate from my aspx result pages?
Nov 18 '05 #1
2 1645


"Raed Sawalha" wrote:
I'd like to optimize my aspx pages for Search Engines like google. One thing
I have to do is to minimize or delete the viewstate hidden input field. I'm
using user controls, so in both pages and user controls I considered the tag:
EnableViewState="False". The problem is that viewstate is still in the result
pages.

How can I delete viewstate from my aspx result pages?


Hi,

try to turn off view state for entire page.

<%@Page EnableViewState="False" %>

Nov 18 '05 #2

Hi Raed,

After you disable the ViewState on the page and control level, if you are
still getting seeing the viewstate on the page ultramagically, you can try
enabling tracing on the page and look who's calling it. You will have to look
for LoadViewState and SaveViewState() being called. One should happen after
Init() and the latter after PreRender().

Hope this helps,

Ethem
"Uros" wrote:


"Raed Sawalha" wrote:
I'd like to optimize my aspx pages for Search Engines like google. One thing
I have to do is to minimize or delete the viewstate hidden input field. I'm
using user controls, so in both pages and user controls I considered the tag:
EnableViewState="False". The problem is that viewstate is still in the result
pages.

How can I delete viewstate from my aspx result pages?


Hi,

try to turn off view state for entire page.

<%@Page EnableViewState="False" %>

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ersin Gençtürk | last post by:
Server : WEB System.Web.HttpUnhandledException: Exception of type System.Web.HttpUnhandledException was thrown. ---> System.Web.HttpException: The View State is invalid for this page and might be...
0
by: Jonah Olsson | last post by:
Hi guys, How can I change the following code to work without using Viewstate? Thanks Jonah ** file.aspx ** <asp:datagrid ID="dgEmails" runat="server" Width="95%"
3
by: RCS | last post by:
I have an app that I have different "sections" that I want to switch back and forth from, all while having the server maintain viewstate for each page. In other words, when I am on Page1.aspx and...
11
by: Nad | last post by:
Hello, I have a page with two link buttons. When I click on the first one I call server.execute("target.aspx") to view target.aspx on the original page. Then I click on the second link button...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
5
by: Jeff User | last post by:
Hello ..NET 1.1, VS 2003, C# & asp.net I have tried to follow msdn instructions and samples but I can not get an event to fire for this button on the datagrid. There has to be something obvious...
6
by: scottrm | last post by:
Hi Users seem to be getting the following intermitent error whe they post a form. Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that...
3
by: George Thompson | last post by:
Hi, I come from an ASP background, and I am currently working on a .NET project, so please excuse me if this is a dumb question ... I have written a dynamically generated menu that uses the...
4
by: =?Utf-8?B?TUNN?= | last post by:
I am trying to disable ViewState at the application level. I have the following line in my web.config: <pages enableViewState="false"></pages> But it is not working. What can I do?
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.