Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 26th, 2006, 06:10 PM
Registered User
 
Join Date: Jun 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Customer Support - Adding Second Level Category

When I add a second level category, I receive the following error:


Quote:
quote:Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Cannot have multiple items selected in a DropDownList.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of
Any ideas? I re-installed and attempted to do this from a clean installation and still managed to get the error.

 
Old June 27th, 2006, 04:18 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi mfoof,

I can't look at the original source right now, as my source control server is down. I'll take a look ASAP but that might take a few days.

In the mean time, you can try calling ClearSelection on the relevant drop down control, right before it gets its data.

Please let me know if that helps; if not, I'll look into this but like I said, it may take a couple of days...

Imar
 
Old July 3rd, 2006, 04:34 PM
Registered User
 
Join Date: Jun 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Looks like that did it! Made the following modification to the UpdateDropdown in Categories.aspx.vb:

Private Sub UpdateDropDown(ByVal listNumber As Integer)
        Select Case listNumber
            Case 1
                lstCategoryLevel1.DataBind()
                lstCategoryLevel1.ClearSelection()
                lstCategoryLevel1.Items.FindByText(txtLevel1.Text) .Selected = True
                txtLevel1.Text = ""
            Case 2
                lstCategoryLevel2.DataBind()
                lstCategoryLevel2.ClearSelection()
                lstCategoryLevel2.Items.FindByText(txtLevel2.Text) .Selected = True
                txtLevel2.Text = ""
            Case 3
                lstCategoryLevel3.DataBind()
                lstCategoryLevel3.ClearSelection()
                lstCategoryLevel3.Items.FindByText(txtLevel3.Text) .Selected = True
                txtLevel3.Text = ""
        End Select
    End Sub

 
Old July 4th, 2006, 12:22 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Great. I'll take another look at the source, and if this is indeed the best way to fix the problem, I'll ask Wrox to add it to the errata section.

Thanks for spotting and mentioning this....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004





Similar Threads
Thread Thread Starter Forum Replies Last Post
Customer Support - Can't delete anything mfoof BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 21 June 24th, 2009 04:00 PM
Error-Object does not support doesn't support this bootsy Classic ASP Basics 1 May 25th, 2008 07:14 PM
Customer Support Site Master Pg. Meta Tags taggiese BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 4 February 26th, 2007 11:35 PM
Customer Support overdos2 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 November 30th, 2006 04:54 PM
Need help with creating a Parent Category seanmayhew BOOK: ASP.NET Website Programming Problem-Design-Solution 2 November 13th, 2004 06:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.