Login

Username

Password





Register   Reset password

Get Cuyahoga at SourceForge.net. Fast, secure and Free Open Source software downloads

Forum

Welcome Guest Search | Active Topics | Members

Move the ViewState to the bottom of the page Options
Constructor
Posted: Sunday, November 23, 2008 4:12:05 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
I have tried this in various 'protected override void Render(System.Web.UI.HtmlTextWriter writer)' places in Cuyahoga with no success so far:

//Begin custom 'Move ViewState'
int StartPoint = html.IndexOf("<input type=\"hidden\" name=\"__VIEWSTATE\"&quotwink;
if (StartPoint >= 0) { int EndPoint = html.IndexOf("/>", StartPoint) + 2;
string viewstateInput = html.Substring(StartPoint, EndPoint - StartPoint);
html = html.Remove(StartPoint, EndPoint - StartPoint);
int FormEndStart = html.IndexOf("</form>&quotwink - 1;
if (FormEndStart >= 0)
{
html = html.Insert(FormEndStart, viewstateInput);
}
}
//End custom 'Move ViewState'

Anyone successfully moved the ViewState to the bottom of the page? (For SEO reasons).
Constructor
Posted: Tuesday, January 6, 2009 6:23:08 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
SEO ViewState Adapters for ASP.NET

Download available at bottom of the page: SEOViewState.zip (29.67 KB)

Not yet tested with Cuyahoga, though may be of use.
Constructor
Posted: Monday, February 23, 2009 8:10:59 AM
Rank: Administration
Groups: Administration , Member

Joined: 10/7/2008
Posts: 505
Points: 1,515
This adapter works perfectly on my build and has moved the viewstate to the bottom of the page on all pages.

Like:

(input type="hidden" name="__SEOVIEWSTATE" id="__SEOVIEWSTATE" ... etc

Cuyahoga is great to work with.
martijnb
Posted: Monday, February 23, 2009 11:20:13 PM

Rank: Administration
Groups: Administration , Member

Joined: 12/30/2004
Posts: 1,674
Points: 1,824
Location: Wageningen (NL)
Thanks. Really something to consider for the next versions.
juanwoang
Posted: Friday, February 27, 2009 9:28:26 AM
Rank: Advanced Member
Groups: Member

Joined: 2/6/2009
Posts: 64
Points: 192
Oh, great! Thank u much. I like to add this for mine
Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

Yet Another Forum.net version 1.9.0 running under Cuyahoga.
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.