473,586 Members | 2,683 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Viewstate

I have an aspx page with nothing in it but one literal, which I populate
with straight forward html (the html consists of about 25 tables with
approx. 30 rows each and two columns with text in each cell). When I click
to view the aspx page it takes longer than I would have thought for me to
recieve the page. On looking at the source the <input type="hidden"
name="__VIEWSTA TE" value=jkasdkahs j....> is there but the value is vast in
size, does anyone know why this is and what I can do to resolve it, there
are no controls on the page that post back, just the html I mentioned above.

Thanks.
Nov 19 '05 #1
5 2639
If you wish to turn off Viewstate for your literal control,
use the EnableViewState property and set it to "false".

<asp:Literal id="Literal1"
EnableViewState ="false"
Text="Text"
runat="server"/>


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=============== ======

"Steven Licciardi" <st************ **************@ hotmail.com> wrote in
message news:uc******** ******@TK2MSFTN GP10.phx.gbl...
I have an aspx page with nothing in it but one literal, which I populate
with straight forward html (the html consists of about 25 tables with
approx. 30 rows each and two columns with text in each cell). When I click
to view the aspx page it takes longer than I would have thought for me to
recieve the page. On looking at the source the <input type="hidden"
name="__VIEWST ATE" value=jkasdkahs j....> is there but the value is vast in
size, does anyone know why this is and what I can do to resolve it, there
are no controls on the page that post back, just the html I mentioned
above.

Thanks.



Nov 19 '05 #2
Thanks.

"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:uH******** *****@TK2MSFTNG P12.phx.gbl...
If you wish to turn off Viewstate for your literal control,
use the EnableViewState property and set it to "false".

<asp:Literal id="Literal1"
EnableViewState ="false"
Text="Text"
runat="server"/>


Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=============== ======

"Steven Licciardi" <st************ **************@ hotmail.com> wrote in
message news:uc******** ******@TK2MSFTN GP10.phx.gbl...
I have an aspx page with nothing in it but one literal, which I populate
with straight forward html (the html consists of about 25 tables with
approx. 30 rows each and two columns with text in each cell). When I
click
to view the aspx page it takes longer than I would have thought for me to
recieve the page. On looking at the source the <input type="hidden"
name="__VIEWS TATE" value=jkasdkahs j....> is there but the value is vast in
size, does anyone know why this is and what I can do to resolve it, there
are no controls on the page that post back, just the html I mentioned
above.

Thanks.


Nov 19 '05 #3
Hi Steven,

First about Viewstate...

The web is a stateless medium – state is not maintained between client
requests by default. ViewState is the mechanism by which page state
(information) is maintained between page post backs.

OK, now. The viewstate is encrypted and sent to the client(browser) and then
decrypted back when it hits back the server. The vast value you see there is
nothing but this encrypted code. There will be performance overhead if
viewstate is enabled.

The server side controls have this property called 'EnabledViewSta te'. Set
it to false, in case you do not need the view state for a particular control.
You can also disable viewstate for the entire page by setting
'EnabledViewSta te' to false in the page level.

Need any help, do post a msg back..

Happy Coding

"Steven Licciardi" wrote:
I have an aspx page with nothing in it but one literal, which I populate
with straight forward html (the html consists of about 25 tables with
approx. 30 rows each and two columns with text in each cell). When I click
to view the aspx page it takes longer than I would have thought for me to
recieve the page. On looking at the source the <input type="hidden"
name="__VIEWSTA TE" value=jkasdkahs j....> is there but the value is vast in
size, does anyone know why this is and what I can do to resolve it, there
are no controls on the page that post back, just the html I mentioned above.

Thanks.

Nov 19 '05 #4
The property is "EnableViewStat e", not "EnabledViewSta te".

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=============== ======

"Vishnu-Chivukula" <Vi************ *@discussions.m icrosoft.com> wrote in
message news:C5******** *************** ***********@mic rosoft.com...
Hi Steven,

First about Viewstate...

The web is a stateless medium - state is not maintained between client
requests by default. ViewState is the mechanism by which page state
(information) is maintained between page post backs.

OK, now. The viewstate is encrypted and sent to the client(browser) and
then
decrypted back when it hits back the server. The vast value you see there
is
nothing but this encrypted code. There will be performance overhead if
viewstate is enabled.

The server side controls have this property called 'EnabledViewSta te'. Set
it to false, in case you do not need the view state for a particular
control.
You can also disable viewstate for the entire page by setting
'EnabledViewSta te' to false in the page level.

Need any help, do post a msg back..

Happy Coding

"Steven Licciardi" wrote:
I have an aspx page with nothing in it but one literal, which I populate
with straight forward html (the html consists of about 25 tables with
approx. 30 rows each and two columns with text in each cell). When I
click
to view the aspx page it takes longer than I would have thought for me to
recieve the page. On looking at the source the <input type="hidden"
name="__VIEWSTA TE" value=jkasdkahs j....> is there but the value is vast
in
size, does anyone know why this is and what I can do to resolve it, there
are no controls on the page that post back, just the html I mentioned
above.

Thanks.

Nov 19 '05 #5
Thanx Juan,

I stand corrected. It is 'EnableViewStat e'.

;-)

Happy Coding.

"Juan T. Llibre" wrote:
The property is "EnableViewStat e", not "EnabledViewSta te".

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
=============== ======

"Vishnu-Chivukula" <Vi************ *@discussions.m icrosoft.com> wrote in
message news:C5******** *************** ***********@mic rosoft.com...
Hi Steven,

First about Viewstate...

The web is a stateless medium - state is not maintained between client
requests by default. ViewState is the mechanism by which page state
(information) is maintained between page post backs.

OK, now. The viewstate is encrypted and sent to the client(browser) and
then
decrypted back when it hits back the server. The vast value you see there
is
nothing but this encrypted code. There will be performance overhead if
viewstate is enabled.

The server side controls have this property called 'EnabledViewSta te'. Set
it to false, in case you do not need the view state for a particular
control.
You can also disable viewstate for the entire page by setting
'EnabledViewSta te' to false in the page level.

Need any help, do post a msg back..

Happy Coding

"Steven Licciardi" wrote:
I have an aspx page with nothing in it but one literal, which I populate
with straight forward html (the html consists of about 25 tables with
approx. 30 rows each and two columns with text in each cell). When I
click
to view the aspx page it takes longer than I would have thought for me to
recieve the page. On looking at the source the <input type="hidden"
name="__VIEWSTA TE" value=jkasdkahs j....> is there but the value is vast
in
size, does anyone know why this is and what I can do to resolve it, there
are no controls on the page that post back, just the html I mentioned
above.

Thanks.


Nov 19 '05 #6

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

Similar topics

9
21634
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter the results in the grid. Say you filter the grid for records that have a certain condition set to "NO" (in this case a checkbox). In this scenario...
3
2636
by: Steve Drake | last post by:
All, I have a CONTROL that contains 1 control (Control ONE), the 1 control that it can contain 1 or 2 control (Control A and B). Control A, raises and event and Control ONE receives this event and this causes control B to be created, when this is done the VIEWSTATE is lost for CONTROL B. In the EVENT that causes CONTROL B to be created...
7
2037
by: et | last post by:
I'm not sure I understand the use of the ViewState. Do I understand correctly that values of controls are automatically held in a hidden control called ViewState? If so, then why can't we get them, or how do we get that value? I always have to set the ViewState("FirstName") = txtBox.text myself before a postback is done, otherwise, the...
6
2058
by: hitendra15 | last post by:
Hi I have created web user control which has Repeater control and Linkbutton in ItemTemplate of repeater control, following is the code for this control On first load it runs fine but when page gets post back it gives following error Failed to load viewstate. The control tree into which viewstate is
12
1909
by: Nick C | last post by:
Hi How can i reduce the viewstate for my asp.net application. It is getting very large now. What is a good solution? thanks N
0
7912
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7839
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8202
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7959
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
3837
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1449
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.