Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
|
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals 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 February 27th, 2009, 06:36 AM
Registered User
 
Join Date: Feb 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Red face Cascading dropdownlists not working in the edit template of detailsview

I ran into this problem: I came acrossed a requirement where by I had to use two dropdownlist controls in a
detailsview control. Additional requirement was that data in the second dropdownlist control was based on the
selection of data from the first dropdownlist control. For example I have two tables States and Cities. Based on
selected state the corresponding cities of that state should be filled in the second dropdownlist control.
Steps:
1. Create a DetailsView, bind it to some data table
2. Convert one bound field (ex. fieldA) into Template field
3. Edit template, in the EditItemTemplate, drag a DropDownList (ex. DDL1), set its datasource to SQL data source
object (table States)
4. Convert another bound field (ex. fieldB) in to Template field
5. Edit template, in the EditItemTemplate, drag another DropDownList (ex. DDL2), set its datasource to SQL data
source object (table Cities) with some select parameter (from DDL1)
6. Run the application
7. Select some item and press "Edit", then select any other list item in DDL1
Expected Results:
DDL2 should map the corresponding item and no error occurs: based on selected state the corresponding cities of
that state should be filled in the second dropdownlist control
Actual Results
The web application aborts and the exception message pops up in the VS2005 /VS2008 IDE.
Anyone can help me to solve this problem please.
 
Old February 27th, 2009, 07:55 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hello.

Ok, it aborts. What which error do it throw? saying that it abort is to generic...
__________________
HTH

Gonzalo


================================================== =========
Read this if you want to know how to get a correct reply for your question.
(Took that from Doug signature and he Took that from Peter profile)
================================================== =========
My programs achieved a new certification :
WORKS ON MY MACHINE
================================================== =========
I know that CVS was evil, and now i got the
proof.
================================================== =========





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Gridview to Edit NOT DetailsView ? kalel_4444 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 December 4th, 2008 11:36 PM
Populating DropDown List in DetailsView Edit Mode. kevorkian ASP.NET 2.0 Professional 2 June 9th, 2008 12:42 PM
Filtering Template columns in Detailsview shashipandey ASP.NET 2.0 Professional 0 September 20th, 2007 04:58 AM
problem with populating ddl in edit of detailsview hertendreef ASP.NET 2.0 Professional 1 August 16th, 2007 12:21 PM
Dropdownlists in DetailsView irelandk BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 February 20th, 2007 10:13 AM





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