473,326 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Slow page load due to viewstate

I have a selection window, here are some dropdownlist if i click on an
item in a dropdownlist the page reloads itself an puts the selected
item in a textbox. Then i can search on the value in the textbox.
The values in the dropdownlist is variable. In one of the dropdownlists
there are lots of values and my viewstate is very large. My page is
almost 3 mb. This is way too much to load every time.
I can not set my viewstate to false because then the page doesn't work
anymore as it should be. (The textbox doesn't fill and my dropdownlist
becomes empty).

I 'm searching for a way to disable the viewstate and not to do a
postback every time i want to change something in my page.
The person who made this page has moved to another company so i'm
practically new to this.

Can someone give me some way to fix my problem?
Thanks for the help.

Jan 16 '07 #1
2 3014
You have a couple of choices to trim down your page.

1. Use Ajax to refresh elements on the page when a dropdown item is selected
2. Use a wizard control (or panels - have to use panels in 1.x) to switch
out elements. Elements that are not visible do not re-download.

The third choice is to re-architect the page, and perhaps the application,
to change flow.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

********************************************
Think outside the box!
********************************************
"Jman" <je*****************@gmail.comwrote in message
news:11**********************@m58g2000cwm.googlegr oups.com...
>I have a selection window, here are some dropdownlist if i click on an
item in a dropdownlist the page reloads itself an puts the selected
item in a textbox. Then i can search on the value in the textbox.
The values in the dropdownlist is variable. In one of the dropdownlists
there are lots of values and my viewstate is very large. My page is
almost 3 mb. This is way too much to load every time.
I can not set my viewstate to false because then the page doesn't work
anymore as it should be. (The textbox doesn't fill and my dropdownlist
becomes empty).

I 'm searching for a way to disable the viewstate and not to do a
postback every time i want to change something in my page.
The person who made this page has moved to another company so i'm
practically new to this.

Can someone give me some way to fix my problem?
Thanks for the help.
Jan 16 '07 #2
Not everything in a web application has to be done on server side. You can
do many things on client side without round trips to the server. You need to
know a bit of javascript and html for this.

If upon a selection in the dropdown you just need to fill up a textbox, it
is a typical client side task. If you need also to do something with the
database, you must go to the server for this, everything depends on your
specific requirements. You may find an compromise in Ajax.

You can disable/enable viewstate for every control separately with the
EnableViewState property.

Another option for reducing the viewstate size is to disable it for the
viewstate-hungry controls and reload them on every postback on server side.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Jman" <je*****************@gmail.comwrote in message
news:11**********************@m58g2000cwm.googlegr oups.com...
>I have a selection window, here are some dropdownlist if i click on an
item in a dropdownlist the page reloads itself an puts the selected
item in a textbox. Then i can search on the value in the textbox.
The values in the dropdownlist is variable. In one of the dropdownlists
there are lots of values and my viewstate is very large. My page is
almost 3 mb. This is way too much to load every time.
I can not set my viewstate to false because then the page doesn't work
anymore as it should be. (The textbox doesn't fill and my dropdownlist
becomes empty).

I 'm searching for a way to disable the viewstate and not to do a
postback every time i want to change something in my page.
The person who made this page has moved to another company so i'm
practically new to this.

Can someone give me some way to fix my problem?
Thanks for the help.

Jan 16 '07 #3

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

Similar topics

3
by: Stephen | last post by:
I was wondering if someone can help me with an web application design problem. I have a aspx page which builds up an arraylist called addresses and outputs the values in the arraylist items to a...
4
by: Kevin Phifer | last post by:
Ok, before anyone freaks out, I have a solution I need to create that gathers content from maybe different places. Each one can return a <form> in the html, so its the classic can't have more than...
7
by: Donal McWeeney | last post by:
Hi, I'm round-tripping some values my page requires using hidden form fields - my page class requires these values in its OnInit event. I would like to be able to use viewstate to do this -...
8
by: aualias | last post by:
I am rewriting a web page that was previously done with ColdFusion. It has a DataGrid and one column in the DataGrid is a dropdown list which is the same for all rows. The ItemDataBound code...
5
by: tshad | last post by:
Is there a way to carry data that I have already read from the datagrid from page to page? I am looking at my Datagrid that I page through and when the user says get the next page, I have to go...
1
by: Petr SIMUNEK | last post by:
I have 3 buttons on the page. (Created dynamicaly inside For- next loop and hooked up to click event.) When different button is clicked i would like to save a different value to viewstate. In the...
7
by: Shadow Lynx | last post by:
I realize that his question has been asked, in many other forms, many times in this group. Even so, my tired eyes have not yet found a sufficient answer, so I've decided to "reask" it even though...
9
by: Alexander van Doormalen | last post by:
I have a situation that user controls are dynamically loaded within a page. To know which control to 're-add' to the page I saved the control path in the ViewState. This Control is added using...
5
by: =?Utf-8?B?V2FubmFiZQ==?= | last post by:
We have a page that is loading very slow. There is not a lot of data, not a lot of users are connected at the same time and the page does not produce an error, so I am not sure where to start to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.