By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,582 Members | 1,694 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,582 IT Pros & Developers. It's quick & easy.

Web page Drop down list populating

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.