Mike, The code is sound, you may try placing a break point in the code block to see if the Page_Load Sub is being called twice. That is the only reason I can think of for you can be getting two copies of each entry in the list boxes. You can always try clearing the contents of the list box before you load it so if the code is being executed more than once it will still end up with only one copy of each entry. Dirty, but effective if you can't identify why the code is being executed twice.
John -----Original Message----- From: Michael Gerholdt [mailto:gerholdt@;fredonia.edu] Sent: Saturday, October 19, 2002 4:48 PM To: dotnet Subject: seeing double in listobox Can someone help me see what's going on there that would cause everything in each listbox to be duplicated? thanks, Mike Sub Page_Load( ByVal sender As System.Object, _ ByVal e as System.EventArgs) Handles MyBase.Load If not IsPostBack Then dim books(,) as string = { _ {"Programming C#","08478748"}, _ {"Programming ASP.NET","123434533"}, _ {"WebClasses From Scratch","22233323"}, _ {"This is dotNet","44445555"}, _ {"The Last Book", "88898988"} _ } dim i as integer for i = 0 to books.GetLength(0) - 1 lbSingle.Items.Add(new ListItem(books(i,0),books(i,1))) lbMulti.Items.Add(new ListItem(books(i,0),books(i,1))) next End If End Sub --- You are currently subscribed to dotnet as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --------- Administrated by 15 Seconds : http://www.15Seconds.com List Archives/Search : http://local.15Seconds.com/search Subscription Information : http://www.15seconds.com/listserv.htm Advertising Information: http://www.internet.com/mediakit/ The content contained in this electronic message is not intended to constitute formation of a contract binding TWTC. TWTC will be contractually bound only upon execution, by an authorized officer, of a contract including agreed terms and conditions or by express application of its tariffs. This message is intended only for the use of the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the sender of this E-Mail or by telephone. --- You are currently subscribed to dotnet as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] --------- Administrated by 15 Seconds : http://www.15Seconds.com List Archives/Search : http://local.15Seconds.com/search Subscription Information : http://www.15seconds.com/listserv.htm Advertising Information: http://www.internet.com/mediakit/
