Viewstate is nice, but you know viewstate data counts 1/3 of my page size.
I need viewstate because I have button control inside my repeater control,
but any idea how can I reduce the viewstate site, it sounds horrible to have
so big viewstate.
regards,
Guoqi Zheng http://www.ureader.com 8 1335
"guoqi zheng" <no@sorry.com > wrote in message
news:12******** *************** *******@ureader .com... Viewstate is nice, but you know viewstate data counts 1/3 of my page size.
I need viewstate because I have button control inside my repeater control, but any idea how can I reduce the viewstate site, it sounds horrible to
have so big viewstate.
regards,
Guoqi Zheng http://www.ureader.com
It took a bit of extra coding, but I found the you can turn the viewstate
off for many lower level controls and then put your own items in viewstate
that you need to remember on post back. The key is figuring out exactly what
you need on postback and what you do not need. I was able to take my
viewstate from 18K down to 2K of page weight.
Mike
ja, right,
I put EnableViewState = false on many controls. But it is a repeater control
and data on repeater control has to be remembered, that is big. that is the
problem.
The situation is that I have a repeater control, inside that control, I have
one button control. When user clicks that button control, server has to do
something based the datarow of that repeater. Do you think I can disable
viewstate on that repeater control???
regards,
Guoqi Zheng http://www.ureader.com
"guoqi zheng" <no@sorry.com > wrote in message
news:cd******** *************** *******@ureader .com... ja, right,
I put EnableViewState = false on many controls. But it is a repeater
control and data on repeater control has to be remembered, that is big. that is
the problem.
The situation is that I have a repeater control, inside that control, I
have one button control. When user clicks that button control, server has to do something based the datarow of that repeater. Do you think I can disable viewstate on that repeater control???
regards,
Guoqi Zheng http://www.ureader.com
I have enableviewstate =false on datalists ( I have not tried this on
repeaters, but I think it would work). The trick you must bind the data
source of the datalist during the page_load event. I don't know the techical
reason, but by doing this the events such as onclick are restored. Hope
this helps.
Mike
"vMike" <Mi************ @spamnotgewarre n.com.delete> wrote in message
news:u0******** *********@newsr ead2.news.atl.e arthlink.net... "guoqi zheng" <no@sorry.com > wrote in message news:cd******** *************** *******@ureader .com... ja, right,
I put EnableViewState = false on many controls. But it is a repeater control and data on repeater control has to be remembered, that is big. that is the problem.
The situation is that I have a repeater control, inside that control, I have one button control. When user clicks that button control, server has to
do something based the datarow of that repeater. Do you think I can
disable viewstate on that repeater control???
regards,
Guoqi Zheng http://www.ureader.com
I have enableviewstate =false on datalists ( I have not tried this on repeaters, but I think it would work). The trick you must bind the data source of the datalist during the page_load event. I don't know the
techical reason, but by doing this the events such as onclick are restored. Hope this helps.
Mike
This should say, you must rebind the datalist (or repeater) during the
page_load event even on postback.
So by eliminating the viewstate you increase the backend processing a bit.
guoqi zheng wrote: Viewstate is nice, but you know viewstate data counts 1/3 of my page
size.
It could count more than 90% if you use large datagrids I need viewstate because I have button control inside my repeater
control, but any idea how can I reduce the viewstate site, it sounds horrible
to have so big viewstate.
Eh.. What exactly do you need the viewstate for?? Could you paste a few
lines of your .aspx?
vMike wrote: "vMike" <Mi************ @spamnotgewarre n.com.delete> wrote in message news:u0******** *********@newsr ead2.news.atl.e arthlink.net... "guoqi zheng" <no@sorry.com > wrote in message news:cd******** *************** *******@ureader .com... ja, right,
I put EnableViewState = false on many controls. But it is a
repeater control and data on repeater control has to be remembered, that is big.
that is the problem.
The situation is that I have a repeater control, inside that
control, I have one button control. When user clicks that button control, server
has to do something based the datarow of that repeater. Do you think I can disable viewstate on that repeater control???
regards,
Guoqi Zheng http://www.ureader.com I have enableviewstate =false on datalists ( I have not tried this
on repeaters, but I think it would work). The trick you must bind the
data source of the datalist during the page_load event. I don't know the
techical reason, but by doing this the events such as onclick are restored.
Hope this helps.
Mike
This should say, you must rebind the datalist (or repeater) during
the page_load event even on postback.
So by eliminating the viewstate you increase the backend processing a
bit.
If the datalist/repeater is not user-specific, Cache should be a better
solution to improve the performance. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 the search returns one result. If I then check the checkbox ("YES") and save it, I now get my message...
|
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 I have to set
|
by: neo |
last post by:
hi,
I am studying ASP.NET and have few questions -
1) The session ID and values of controls is stored in VIEWSTATE
variable. So now when we put EnableViewState="false" in Page directive and
disable the session state in Web.Config the VIEWSTATE variable is still
maintained and stores some values. Can anyone tell what those values are
for, i.e what other info is stored in VIEWSTATE other than the session ID
and the control values ?
|
by: Simon |
last post by:
Hi everyone,
I have a quick question that I hope someone can help me with:
I've made a user control that contains a text box and some validation
functionality. This control has a few extra properties declared on it over
and above that provided by the textbox.
As I understand it, part of the process to make this work is, in the
property accessor's for the properties that you wish to persist you add
|
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 value of ViewState("FirstName") is always
empty; there doesn't seem to be a way to retrieve that...
| |
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 set textboxes, radio
buttons, etc - that viewstate is fine. Then I have a linkbutton that does a
Server.Transfer over to Page2.aspx. When I Server.Transfer back to
Page1.aspx, the viewstate info is lost.
I ran across another example of this last...
|
by: Mark Broadbent |
last post by:
Been a while since I've touched asp.net but one thing that always seems to
fustrate me is the loss of state on variable declarations. Is there anyway
(i.e. assigning an attribute etc) to instruct the server to remember a
variables state *without* having to go through the rigmarole of saving and
loading to and from the Session state manually or similar workaround for any
Types (including custom types) in exactly the same way web controls...
|
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
|
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
|
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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 most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |