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

Filling multiple dropdowns while page loading

I have 8 dropdowns to be filled from database .
To avoid roundtrips to the database what i should use?
Apr 17 '07 #1
7 1378
prabunewindia
199 100+
you can use

if(! IsPostBack)
{
// code to fill dropDownBox;
}

so u can avoid round trips to database after page loaded once
Prabu

I have 8 dropdowns to be filled from database .
To avoid roundtrips to the database what i should use?
Apr 17 '07 #2
gomzi
304 100+
I have 8 dropdowns to be filled from database .
To avoid roundtrips to the database what i should use?
use Atlas.
Apr 17 '07 #3
Use DISTINCT in ur query

EX:select DISTINCT name from Table1
Apr 17 '07 #4
ummaria
16
You can try the PreRender()
Apr 19 '07 #5
Frinavale
9,735 Expert Mod 8TB
I have 8 dropdowns to be filled from database .
To avoid roundtrips to the database what i should use?
You could fill a dataSet or some other object with the information gathered from the database on the first trip to the website, then store this object into session.

You can just use the object stored in session to fill your dropDownLists instead of having to grab the information from the database every time...

This will work unless you need up-to-date data from the database every time the user posts back. Then I don't think there's a way around it.

-Frinny
Apr 19 '07 #6
first u create a methosd like that for all dropdown list

and then call then them in page load method
that is automaticaly dowload at the at the loading of page

if(!IsPostBack)
{
//call drop down list method
}
Apr 20 '07 #7
dwadish
129 100+
first u create a dataset object
then select columns from table using sqldataadapter and fill it to the dataset

write code for displaying first dropdownlist
use the databind()
use these to all of ur dropdownlistbox
and binding method also

retry now
Apr 20 '07 #8

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

Similar topics

0
by: Pat Patterson | last post by:
I'm having serious issues with a page I'm developing. I just need some simple help, and was hoping someone might be able to help me out in here. I have a form, that consists of 3 pages of...
3
by: Damon | last post by:
I am working on a site in which I would like to have two dropdowns that will allow a user to navigate through the administrative pages of the site. The first would allow the user to choose the...
4
by: Diane Selby | last post by:
Hi- I am developing an ASP.NET application that can take a few seconds to process the request from the user. We are looking for a client-side solution that will prevent users from resubmitting...
1
by: Andy | last post by:
What I want to do is to populate multiple dropdowns when editing. Presumably... a) I should use a DataReader so that I can get each ResultSet for each dropdown control, and that should cut down...
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
0
by: reidarT | last post by:
I have found a good combobox with multiple fields The example shows filling the combobox from a listview, but I want to fill it with zip-code and cities from a database. The example is as follows:...
3
by: Simon Harvey | last post by:
Hi everyone, I keep getting a problem with dropdownlist controls. It sounds really stupid, but my app is screwed as long as this keeps happening. It seems to spontaneously happen and then I...
0
by: Victoria Bolton | last post by:
I have an insert form that I want to double up as a edit form. I pass an id number by querystring and then in the page_Loadcomplete I call a function that fills the controls on the page with the...
6
by: yk | last post by:
Hi, Is it a technique available in html/javascript in order to display same image many many times on a same page? Because of a large page loading I am looking for a way not to have same...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...

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.