473,769 Members | 2,091 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filling multiple dropdowns while page loading

5 New Member
I have 8 dropdowns to be filled from database .
To avoid roundtrips to the database what i should use?
Apr 17 '07 #1
7 1401
prabunewindia
199 New Member
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 Contributor
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
vidhyapriya
64 New Member
Use DISTINCT in ur query

EX:select DISTINCT name from Table1
Apr 17 '07 #4
ummaria
16 New Member
You can try the PreRender()
Apr 19 '07 #5
Frinavale
9,735 Recognized Expert Moderator Expert
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
vivekshrivastava51
18 New Member
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 New Member
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
1977
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 fields. I'd like to create a page in which all of this is stored as you move along as hidden variables, until the end, when the user submits. I can't figure out one thing: I have dynamic form elements (dropdowns), that I'd like to use instead of...
3
1590
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 particular site that they would like to edit. The second would allow the user to select which admin screen they would like to edit. The second dropdown needs to be populated based on the selection in the first one. I want to encapsulate these...
4
5037
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 the page multiple time in their irrational impatience. There are a few posts on this group which suggest that we use JavaScript hooked up to the page's OnSubmit event to catch mulitple submissions. See postings by Craig Deelsnyder et alia.
1
1465
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 round trips to the server. b) I should populate these dropdowns in the DataGrid_EditCommand? What I am having problems with is actually referencing the dropdowns on the template. e.g. I have a dropdown called drpAccessLevels, but I cannot find this...
6
4997
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 for long running reports. When the processing is complete it uses crystal reports to load a template file, populate it, and then export it to a PDF. It works fine so far....
0
1246
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: Dim dtLoading As New DataTable("UsStates") dtLoading.Columns.Add("Name", System.Type.GetType("System.String")) dtLoading.Columns.Add("Abbreviation", System.Type.GetType("System.String"))
3
1219
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 cant fix it without rebuilding the whole page from scratch! Not Fun. :-( So whats happening is I have my dropdowns on the page. The user comes along and selects an option, but when the user submits the page,. its as if nothing
0
1278
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 data from a datareader. Some of those controls are bound dropdownlists that have usernames, catagory types and vendor names in etc. In my fill event I am trying this: Me.ddlCat.SelectedIndex =
6
9380
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 image many times in a page load, but rather once. Yefim
0
10038
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9987
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,...
0
9857
tracyyun
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...
0
8867
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7404
isladogs
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...
0
6662
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();...
0
5294
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...
1
3952
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2812
bsmnconsultancy
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...

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.