473,405 Members | 2,154 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,405 software developers and data experts.

HELP: User control problem (with drop down list populated by db)

I have a user control that has a drop down list. Initially it has no items.
The items are loaded into the drop down list in the Page_Load event of the
user control. Basically if MyDropDownList.Items.Count=0 (first time) I open
up a database and populate the drop down list.

The user control is on the top of several other pages. I put a break point
on the Page Load of the user control and MyDropDownList.Items.Count is
ALWAYS 0, even though I step through the code where it adds items to the
list. It seems like it's refreshing the user control to it's default or
something.

Any ideas?
Nov 18 '05 #1
0 1037

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

Similar topics

0
by: Mark | last post by:
Hi, I have created a custom user control that includes a dynamically created drop down list populated with data from a database. The control class contains a BindList routine that is used to...
46
by: Kingdom | last post by:
In my data base I have a list of componet types e.g. type A - I have 8 off - type B I have 12 off etc. I'm using Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM Parts_Table") ...
3
by: Mike | last post by:
I have a web page that displays contact people in a drop down. the users selects a person then clicks the go button. The datagrid should pop with all the information on the select contact person,...
2
by: Sam Kuehn | last post by:
There has been a lot of articles on how to load user controls at runtime in the Init() method. UserControl myControl = (UserControl)LoadControl(stringControl); I add the control in the Init()...
3
by: pmud | last post by:
Hi, I have a drop down list bound to a database thorugh a data reader. It reads the customer names from data reader. Now, I want the user to be able to type more than one alphabet & the list...
1
by: Chris | last post by:
Hi, I am writing a web app in C#. I have a webform with a drop down list box that is populated with user names. I load this only on if not is a postback, which means it only loads the first...
2
by: kalaivanan | last post by:
hi, i am developing web application using c#. in a particular page i am using two drop down list boxes, one for product and the other for corresponding models of a product. whenever i select a...
1
by: jacbyrd | last post by:
I have created a user control that is a drop down list that pulls from my database. I then drop that control into a detailsview control on an insert item template. When I run the insert command,...
1
by: scott | last post by:
Hello, Thanks in advance for any help you might be able to offer... I have an html table with two columns and 10 rows. The first column contains a textbox that is populated. The second column...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
0
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...
0
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...
0
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,...

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.