|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
hello,
i am optimizing www.ilanguage.com/en for search engines, directories & crawlers. i was wondering if there is a way to move the viewstate hidden field in asp.net (<input type="hidden" name="__VIEWSTATE" value="dDwtMzU.........) towards the bottom of the page, so that the body text of the page comes before the viewstate field, at least for the home page?? the reason i am doing this is because with the viewstate field before the body text of the website it greatly limits the ability for the website to rank well, since the body text is where alot of SE's look for the keywords, and the viewstate field is so long. can anyone help me with this? thanks in advance, |
|
#2
|
||||
|
||||
|
setup a table and do a rowspan command to shift the rows around. easier in dreamweaver plus you can read up on it.
http://www.seo-guide.com/tabletrick.html it's neat and makes sense BTW Welcome to the board -PK |
|
#3
|
|||
|
|||
|
thanks
will try this out see if it works |
|
#4
|
||||
|
||||
|
Better actually is to use absolute positioning through css layers.
Check out... http://search-engine-positioning-se...seo/layers.html Alan |
|
#5
|
|||
|
|||
|
the last link on the page is broke. Can someone find a substitute?
I really need a solution to this. Thanks |
|
#6
|
|||
|
|||
|
|
|
#7
|
||||
|
||||
|
alex—
__________________
columbus ohio architect | columbus ohio web site designer | sussex county new jersey business directory | columbus ohio |
|
#8
|
||||
|
||||
|
But....
Flesk writes it(viewstate) on server side instead of sendnig it to client. Any other way to Move the viewstate towards end of form tag?
Me also doubts alex_1... is a part of http://www.flesk.net [Just a wild guess...as it often happens in SEO industry.. Last edited by sanjaykattimani : August 5th, 2004 at 01:47 AM. |
|
#9
|
|||
|
|||
|
This code will move the viewstate to the bottom of the rendered HTML. The best bet would be to throw this into a base page class that all of the pages in your project inherit from. Otherwise, you can just throw this code onto every page that requires moving the viewstate. Also, be sure to disable viewstate (EnableViewState="False") on any controls that don't actually need it. By default, it is turned on for every control on a page.
protected void Render(System.Web.UI.HtmlTextWriter writer) { System.IO.StringWriter stringWriter = new System.IO.StringWriter(); HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter); base.Render(htmlWriter); string html = stringWriter.ToString(); int StartPoint = html.Indexof("<input type="hidden" name="__viewstate""); 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>") - 1; if (FormEndStart >= 0) { html = html.Insert(FormEndStart, viewstateInput); } } writer.Write(html); } Quote:
|
![]() |
| Viewing: SEO Chat Forums > Search Engine Strategies > Search Engine Optimization > how can i move the viewstate hidden field in asp.net?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|