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

Web page Drop down list populating

I have a drop down that populates on page load. The drop down brings in
customer numbers from my local MSDE database. It does this fine, but I click
a button that finds quotes for those customers and the next time I go to
drop down the list, all the customer numbers are doubled
(1015,1016,1017,1015,1016,1017..)

How do I get that to stop? Do I have to check if it's a post back or
something like that?

I'm fairly new at this, if you can't tell..
Thanks!
Nov 20 '05 #1
4 8043
Hello,

"Pete Lux" <pe******@theheritagegrp.com> schrieb:
I have a drop down that populates on page load. The
drop down brings in customer numbers from my local
MSDE database. It does this fine, but I click a button
that finds quotes for those customers and the next time I go to
drop down the list, all the customer numbers are doubled
(1015,1016,1017,1015,1016,1017..)

How do I get that to stop? Do I have to check if it's a post
back or something like that?


You may want to turn to the ng for ASP.NET Web Controls questions for future
ASP.NET Web Control related questions:

news://msnews.microsoft.com/microsof...et.webcontrols

Web interface:

http://msdn.microsoft.com/newsgroups...et.webcontrols

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #2
Two possibilities:

One - The code populating the dropdown list is NOT in an:

If NOT Page.IsPostBack THEN

End If

if so then the list is getting populated every time the page is loaded,
whether postback or no...

Two: On the line BEFORE the code to populate the dropdown list add this:

DropDownList1.Items.Clear()

Then let the code populate the list again.

Severin

"Pete Lux" <pe******@theheritagegrp.com> wrote in message
news:uT**************@TK2MSFTNGP09.phx.gbl...
I have a drop down that populates on page load. The drop down brings in
customer numbers from my local MSDE database. It does this fine, but I click a button that finds quotes for those customers and the next time I go to
drop down the list, all the customer numbers are doubled
(1015,1016,1017,1015,1016,1017..)

How do I get that to stop? Do I have to check if it's a post back or
something like that?

I'm fairly new at this, if you can't tell..
Thanks!

Nov 20 '05 #3
Cor
Herfried,
Please how many times do I have to ask this, dont do that, the answer from
DGeorge is the right one, he never get that in the groups you mentioned.

It is 100% vb.language code.
Cor
Nov 20 '05 #4
Hello,

"Cor" <no*@non.com> schrieb:
Please how many times do I have to ask this, dont do
that, the answer from DGeorge is the right one,
he never get that in the groups you mentioned.

It is 100% vb.language code.


But the problem is 0% related to VB.NET.

:-)

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
http://www.mvps.org/dotnet
Nov 20 '05 #5

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

Similar topics

4
by: Vegard H. Villmones | last post by:
Hi. I have a table containing a list of about 5000 numbers, and there is also in existence one MSWord document for everyone of them numbers. I want to create some sort of drop down menu (in a...
3
by: Deb | last post by:
I am having a problem creating a form in Access 2000 which I have done with no problem in 97. I have an unbound drop down box. This idea is for the user to select from the drop down box and the...
1
by: J. Babe | last post by:
I am populating a drop down list with a privilege levels from a table called "Privilege" with the fields "PrivilegeID" and "PrivilegeName". In a table named "Users", their is a corresponding column...
1
by: Phil Barber | last post by:
I am populating a drop dow list for a recordset using a reader: while(DR.Read()) CmbConv.Items.Add(DR.ToString() + " "+DR.ToString()); Is there a way to format the drop down list so that it...
6
by: Casey | last post by:
hello, I need to populate a drop down list when the user clicks on the arrow button. how do i do this. Should i use a html select control or is it possible using the asp:dropdownlist
5
by: TB | last post by:
Hi All: The following is probably a newbie question, but please bear with me: I am populating a drop down list with items from a database, and would the default selected item to be the current...
0
by: mrjoka | last post by:
hi friends; i'm stuck in a web site and i hope you can help me. i'm working in a statistic web site where i'm using mastre page(this is the first time i'm working with master page) in this mastre...
1
by: boss1 | last post by:
hello everyone, I am having a problem with populating second a drop down list depending on selected value of first drop down list. I have been searching the net for the last couple of days i...
14
by: Philth | last post by:
Hi there, I've essentially got a form with several drop down, each populated by columns in various tables. The populating bit works fine - the column rows appear as they should in the menu. ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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
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...
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.