Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > the viewstate hidden field, how can I reduce it?

Reply
Thread Tools

the viewstate hidden field, how can I reduce it?

 
 
Jeff
Guest
Posts: n/a
 
      04-08-2010
hi

asp.net 3.5

I see in my page that the hidden field viewstate is relativly very large,
and are looking for ways to reduce it. Because I think it can improve
ranking.

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="WJ6eLjF5Grnr80+KngeZIcTDmEbX+zjv6ptIUmMgYaq KCBB/5hAKJ748W52U1l74GfNLHDuTLuwC/O4GQE/Sp+BnQYsW+nJHK+Qkg6xfb467kHRpiCUUl/Uv2tgQssSa2K4sfbMyaL/IIlb03091A3lbQV1wLMDvL7NPqXgwJERA1+Cx2eNlzll2WkbhN Qw5Ne0FmtmBXaZysPeDEeQIrl5R2IesEHnCbrG5Mz2otNviv2J Kia1yXgAKw3ljDlH7wmYWOF+WXn9lhsF5YElQnMZV2hpzQjJ91 O5YARub/ci77gftNaI2Z6FqHjHve8Yai83aUS/RvXBK/MuDAr0x5QzCldkzBQyqv4FwbUqkP+e5F7Oo/307JM0mj6aBKZHmGzN4bT5cE/G/rOkNP7OrXrL0L/ht8yDOd43WyBuHIxYM3LNKSYimoNnaYKaXFBEmubIsoxpM/gxrEPNonVUozExBOTWIomfAQc5Z8zyeyphehA4iv9GVloZQhEZ WPa29kvwvw1TqXpn9SySEFNikJWyCzTn1CcN8L33zAFJl3NOLW 08yHtEG8r0NgDSE1I3ks0/AIzEIMCpgMfcsWytxwQ=="
/>
</div>

I've already set enableviewstate to false in the master page. This page
(deafult.apsx) has a 3 custom controls: one is control holding the login
control etc. The 2 other controls are based on gridview and loginview

any suggestions?


 
Reply With Quote
 
 
 
 
Mr. Arnold
Guest
Posts: n/a
 
      04-08-2010
Jeff wrote:
> hi
>
> asp.net 3.5
>
> I see in my page that the hidden field viewstate is relativly very large,
> and are looking for ways to reduce it. Because I think it can improve
> ranking.
>
> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
> value="WJ6eLjF5Grnr80+KngeZIcTDmEbX+zjv6ptIUmMgYaq KCBB/5hAKJ748W52U1l74GfNLHDuTLuwC/O4GQE/Sp+BnQYsW+nJHK+Qkg6xfb467kHRpiCUUl/Uv2tgQssSa2K4sfbMyaL/IIlb03091A3lbQV1wLMDvL7NPqXgwJERA1+Cx2eNlzll2WkbhN Qw5Ne0FmtmBXaZysPeDEeQIrl5R2IesEHnCbrG5Mz2otNviv2J Kia1yXgAKw3ljDlH7wmYWOF+WXn9lhsF5YElQnMZV2hpzQjJ91 O5YARub/ci77gftNaI2Z6FqHjHve8Yai83aUS/RvXBK/MuDAr0x5QzCldkzBQyqv4FwbUqkP+e5F7Oo/307JM0mj6aBKZHmGzN4bT5cE/G/rOkNP7OrXrL0L/ht8yDOd43WyBuHIxYM3LNKSYimoNnaYKaXFBEmubIsoxpM/gxrEPNonVUozExBOTWIomfAQc5Z8zyeyphehA4iv9GVloZQhEZ WPa29kvwvw1TqXpn9SySEFNikJWyCzTn1CcN8L33zAFJl3NOLW 08yHtEG8r0NgDSE1I3ks0/AIzEIMCpgMfcsWytxwQ=="
> />
> </div>
>
> I've already set enableviewstate to false in the master page. This page
> (deafult.apsx) has a 3 custom controls: one is control holding the login
> control etc. The 2 other controls are based on gridview and loginview
>
> any suggestions?
>
>


You keep the data in session variables, load the controls from the
session variables, and disable viewstate on the controls.

I don't know what you mean about ranking, but disabling viewstate is
about not transmitting data for a control on the round trip, which
speeds up transmition time of the page.
 
Reply With Quote
 
 
 
 
Jason Keats
Guest
Posts: n/a
 
      04-08-2010
Jeff wrote:
> hi
>
> asp.net 3.5
>
> I see in my page that the hidden field viewstate is relativly very large,
> and are looking for ways to reduce it. Because I think it can improve
> ranking.
>
> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
> value="WJ6eLjF5Grnr80+KngeZIcTDmEbX+zjv6ptIUmMgYaq KCBB/5hAKJ748W52U1l74GfNLHDuTLuwC/O4GQE/Sp+BnQYsW+nJHK+Qkg6xfb467kHRpiCUUl/Uv2tgQssSa2K4sfbMyaL/IIlb03091A3lbQV1wLMDvL7NPqXgwJERA1+Cx2eNlzll2WkbhN Qw5Ne0FmtmBXaZysPeDEeQIrl5R2IesEHnCbrG5Mz2otNviv2J Kia1yXgAKw3ljDlH7wmYWOF+WXn9lhsF5YElQnMZV2hpzQjJ91 O5YARub/ci77gftNaI2Z6FqHjHve8Yai83aUS/RvXBK/MuDAr0x5QzCldkzBQyqv4FwbUqkP+e5F7Oo/307JM0mj6aBKZHmGzN4bT5cE/G/rOkNP7OrXrL0L/ht8yDOd43WyBuHIxYM3LNKSYimoNnaYKaXFBEmubIsoxpM/gxrEPNonVUozExBOTWIomfAQc5Z8zyeyphehA4iv9GVloZQhEZ WPa29kvwvw1TqXpn9SySEFNikJWyCzTn1CcN8L33zAFJl3NOLW 08yHtEG8r0NgDSE1I3ks0/AIzEIMCpgMfcsWytxwQ=="
> />
> </div>
>
> I've already set enableviewstate to false in the master page. This page
> (deafult.apsx) has a 3 custom controls: one is control holding the login
> control etc. The 2 other controls are based on gridview and loginview
>
> any suggestions?
>
>


You can store viewstate on the server - for instance, in a database.

Here's a few search results, in no particular order...

http://forums.asp.net/p/1293397/2504654.aspx

http://geekswithblogs.net/joelross/a.../23/73180.aspx

http://www.componentworkshop.com/blo...-in-a-database

http://www.codeproject.com/KB/viewst...eProvider.aspx

http://weblogs.asp.net/adweigert/arc.../09/86628.aspx

http://highoncoding.com/Articles/699..._Database.aspx

HTH
 
Reply With Quote
 
Jeff
Guest
Posts: n/a
 
      04-08-2010
how do I disable viewstate? I've already set enableviewstate to false in the
master page and on the 3 custom controls. Depsite that I see the hidden
field viewstate in the source containing over 600 characters.

"Jason Keats" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Jeff wrote:
>> hi
>>
>> asp.net 3.5
>>
>> I see in my page that the hidden field viewstate is relativly very large,
>> and are looking for ways to reduce it. Because I think it can improve
>> ranking.
>>
>> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
>> value="WJ6eLjF5Grnr80+KngeZIcTDmEbX+zjv6ptIUmMgYaq KCBB/5hAKJ748W52U1l74GfNLHDuTLuwC/O4GQE/Sp+BnQYsW+nJHK+Qkg6xfb467kHRpiCUUl/Uv2tgQssSa2K4sfbMyaL/IIlb03091A3lbQV1wLMDvL7NPqXgwJERA1+Cx2eNlzll2WkbhN Qw5Ne0FmtmBXaZysPeDEeQIrl5R2IesEHnCbrG5Mz2otNviv2J Kia1yXgAKw3ljDlH7wmYWOF+WXn9lhsF5YElQnMZV2hpzQjJ91 O5YARub/ci77gftNaI2Z6FqHjHve8Yai83aUS/RvXBK/MuDAr0x5QzCldkzBQyqv4FwbUqkP+e5F7Oo/307JM0mj6aBKZHmGzN4bT5cE/G/rOkNP7OrXrL0L/ht8yDOd43WyBuHIxYM3LNKSYimoNnaYKaXFBEmubIsoxpM/gxrEPNonVUozExBOTWIomfAQc5Z8zyeyphehA4iv9GVloZQhEZ WPa29kvwvw1TqXpn9SySEFNikJWyCzTn1CcN8L33zAFJl3NOLW 08yHtEG8r0NgDSE1I3ks0/AIzEIMCpgMfcsWytxwQ=="
>> />
>> </div>
>>
>> I've already set enableviewstate to false in the master page. This page
>> (deafult.apsx) has a 3 custom controls: one is control holding the login
>> control etc. The 2 other controls are based on gridview and loginview
>>
>> any suggestions?
>>
>>

>
> You can store viewstate on the server - for instance, in a database.
>
> Here's a few search results, in no particular order...
>
> http://forums.asp.net/p/1293397/2504654.aspx
>
> http://geekswithblogs.net/joelross/a.../23/73180.aspx
>
> http://www.componentworkshop.com/blo...-in-a-database
>
> http://www.codeproject.com/KB/viewst...eProvider.aspx
>
> http://weblogs.asp.net/adweigert/arc.../09/86628.aspx
>
> http://highoncoding.com/Articles/699..._Database.aspx
>
> HTH



 
Reply With Quote
 
Mr. Arnold
Guest
Posts: n/a
 
      04-08-2010
Jeff wrote:
> how do I disable viewstate? I've already set enableviewstate to false in the
> master page and on the 3 custom controls. Depsite that I see the hidden
> field viewstate in the source containing over 600 characters.



Just because something was done on a master page does that mean that it
applies to all pages.
 
Reply With Quote
 
Jeff
Guest
Posts: n/a
 
      04-08-2010
I applied the enableviewstate="false" to the page as well but still get that
hidden viewstate field

I know it's part of the asp.net design and cannot be completely removed from
the pages. But hope it's possible to reduce it from about 600 chars to under
100.....




"Mr. Arnold" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Jeff wrote:
>> how do I disable viewstate? I've already set enableviewstate to false in
>> the master page and on the 3 custom controls. Depsite that I see the
>> hidden field viewstate in the source containing over 600 characters.

>
>
> Just because something was done on a master page does that mean that it
> applies to all pages.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Populate Hidden field on post back and retrieve value from Hidden Field Rick ASP .Net 3 04-13-2010 05:38 PM
Win 7 folders hidden despite 'show hidden' checked Boppy NZ Computing 10 01-23-2010 02:56 AM
Programmic technics to reduce viewstate in ASP.NET 2.0? Jéjé ASP .Net 0 07-03-2005 10:25 PM
better to compress the jpeg or reduce resolution or reduce pixel size? Mr.Will Digital Photography 8 10-08-2004 03:16 PM



Advertisments