473,322 Members | 1,352 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,322 software developers and data experts.

ASP. NET HUGE pages resulting from common DropDownList controls problem

I am working in ASP .NET 2.0 and have a Web application which requires many (48) DropDownList s which all need to show the same data list; and the list is like 400 items long. I have been working in the industry for many years and have no problem in building the data list from a DB, attaching it to all 48 controls, and having the app/page work OK, but (as you experts are no doubt saying) the page re-draw is painful and the size of the delivered page is huge. I have no doubt that there is some "correct" way to do this which does not require the HTML to carry every one of the 48 X 400 lists explicitly spelled out, (or of course some slicker way to do this in the ".aspx" page) but I can't find it. Thanks for any help.
Feb 19 '08 #1
5 1316
markrawlingson
346 Expert 100+
Ouch. So the end result is 48 drop down lists each with 400 items displayed simultaneously on a single page?

Why do you need ALL 48 displayed on the same page? Is it a master/sub category situation, or what's the deal? Explain a bit further what the purpose of these 48 controls are exactly and how they function. Without knowing that I can't really offer up a competent solution but it sounds like you may want to sort of 'split' the data load somehow, using page enumeration or perhaps ajax if those options are possible and pertinent to the end result.

One of the web sites I work with has sort of the same situation, but not nearly as drastic. The site has 500 end categories (and growing), plus the master categories and sub categories, etc. We use 3 drop down list controls so that a user can choose the master or top category, then a sub category, and then the end category. When a user chooses a master or top category, we use ajax to make a silent request in the backend to grab the sub categories according to what the user chose in the master/top category drop down, and fill in the control with whatever data we get back.

In this way, the page loads with only the master/top category drop down filled in (maybe 50 <option>s at most), the sub category and end category drop downs only fill in when the user chooses a master/top category (and sub-category, respectively) - so the page doesn't load all 500-600 categories on the page all at once - they only load when needed.

Explain the situation a little bit further and perhaps even provide a link if at all possible, and we'll see what we come up with ;)

Sincerely,
Mark
Feb 19 '08 #2
Mark,

Thanks for the response; and yes there are some ways I can "sidestep" the problem; the most obvious is that since the user doesn't always (for all instances/"uses" of the Page) use/need all 48 of the DDLs, I can wait to populate them until we know (from page postbacks) exactly how many of the 48 they will need; then populate just what they will need (however to some extent this will be the same problem; because there are many cases where 30+ of the 48 are actually used; so the difference between 30+ and 48 is small...)

Phil
Feb 19 '08 #3
markrawlingson
346 Expert 100+
so the difference between 30+ and 48 is small...)
True, but it would be a start.

The obvious problem here is the page load, and the page load is caused by the amount of data that's being spat out at once. As such, your only real solution is to somehow split that data load into sections - a crafty UI solution to this problem is in order.

Do you have a copy of the page online somewhere so I can take a look, I'm pretty good with UI solutions and may be able to offer up some solutions on how you can split the data load into sections rather than spitting it onto the page in one go.

Sincerely,
Mark
Feb 19 '08 #4
Mark,

I just took an hour or so and re-wrote the binding code so that it only loads those DDLs which are actually used, and I am getting literally an order of magnitude faster redraws. The customer is so happy they can't see. Sometines it helps just to talk to someone...

Thanks very much,

Phil
Feb 19 '08 #5
markrawlingson
346 Expert 100+
Sometines it helps just to talk to someone...
Couldn't agree with you more Phil. Sometimes I talk to my wife or my father about problems I'm having in programming. They know very little about computers in general, let alone programming - however just talking to someone and getting the juices flowing ALWAYS helps me get to an end solution. Sometimes completely off-topic suggestions like "bunny rabbits eat lettuce" even help, as odd as that sounds.

Anyway, glad that you were able to fix the problem!

Sincerely,
Mark
Feb 19 '08 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

12
by: Stanley J Mroczek | last post by:
How do you load a dropdownlist when edit is clicked in a datagrid ? <Columns> <asp:BoundColumn DataField="OptionDescription" ItemStyle-Wrap="True" HeaderText="Option...
4
by: theo | last post by:
Program flow...load file,then extract the xml text tags from the file,then the number of Xml tags retrieved from the file determines the number of dropdownlist controls instanciated in the...
3
by: Shikari Shambu | last post by:
Hi All, I have a situation where multiple applications are sharing some pages/ controls. So, I have a separate common project that has the common pages/ controls. My question is how do I...
12
by: Wardeaux | last post by:
All, Wanting to find a way to create web pages to add to my website without having to recompile the codebehind everytime I want to add a new one... Here's the deal: I have a web app that takes...
6
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
0
by: Daniel Doyle | last post by:
Hello and apologies in advance for the amount of code in this post. I've also sent this message to the Sharepoint group, but thought that ASP.NET developers may also be able to help, even though...
3
by: Allan Ebdrup | last post by:
Hi I've created a asp.net 2.0 page with an Page_Init eventhandler that I want to share among multiple pages, what's the best approach for this? Should I inherit from the page, or is it better to...
6
by: Steve | last post by:
I'm trying to iterate over all the form controls in my MasterPages content page. Basically, I've got dropdowns, textboxes, etc that I want to format in Page_Load() I've added this code to my...
6
by: shashi shekhar singh | last post by:
Respected Sir, I have to create multiple dynamic dropdownlist boxes and add items dynamically in <asp:table> server control but problem occurs , i.e. except of fist dropdown list no dropdownlist...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, youll 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...
1
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: 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)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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.