Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
bubberz
Constraint Violating Yak Guru
289 Posts |
Posted - 2006-02-04 : 22:41:08
|
I have a dropdownlist / user control I'll create that I'll present to the user 5 times on my web form. This control will hit a static table, but the table has about many, many records.....I think around 30,000 records since it holds people's names.I'm thinking if I set the CacheDuration on the user control = "whateverneeded", then this will do the trick. Is there any limitation to using multiple instance of the same user control even thought it'll be hitting a dataset.The page is almost there, but the way I have it now is I have one dataset that populates all five dropdown lists w/ no CacheDuration used.....and the page is a dog when the postback happens!Thanks! |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2006-02-04 : 23:59:04
|
You are going to present the user with a 30,000 item drop-down list? |
 |
|
bubberz
Constraint Violating Yak Guru
289 Posts |
Posted - 2006-02-05 : 00:07:49
|
It's huge....and we're trying to allow people to add five "resources" at a time rather than do it one at a time. |
 |
|
DustinMichaels
Constraint Violating Yak Guru
464 Posts |
Posted - 2006-02-05 : 05:38:54
|
This seems like a really bad idea. I would try a different approach. But if this is the best way you guys can think to do it make sure that you turn off VIEWSTATE for your user control. |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-02-05 : 07:35:14
|
this is not the way to go bubberz...you need let the user type say first 2 letters and thenpresent him with a choice of names....look into ajax (javascript callbacks)Go with the flow & have fun! Else fight the flow |
 |
|
bubberz
Constraint Violating Yak Guru
289 Posts |
Posted - 2006-02-05 : 08:51:01
|
All,Thanks for the responses!I'll look into the suggestions, and let you know. I'll be doing some testing this week.Spirit1, I like the 2 letters, then get the associated records...this will surely cut down on the records needed.DustinMichaels, I agree...if we can turn off viewState....that will help. I'm guessing I could hold the selecteditem property for the ddl on postbacks as well.... |
 |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2006-02-05 : 14:47:32
|
Even without AJAX, you can do this pretty easily in ASP.NET. But definitely, the way to go is to first have the user enter *something* that will narrow down the list, and then present a drop-down with those filtered items. There is NO WAY you want to a) return 30,000 rows from the DB, b) cache 30,000 rows, c) return an HTML SELECT tag with 30,000 rows and/or d) have a user scroll through 30,000 items in a list box. |
 |
|
bubberz
Constraint Violating Yak Guru
289 Posts |
Posted - 2006-02-05 : 14:53:52
|
Luckily when they add a resource at a time, we found a custom control that has autocomplete so the user can beging typing the name and it'll go to that name structure. |
 |
|
|
|
|
|
|