Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional 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 May 19th, 2004, 12:18 PM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Displaying a passed value in a databound DDL


I need to display a value passed through a session variable to a DDL that is already bound to a DB table and do the same to a dependent child DDL.

I hope I'm explaining this clearly. In essence I have two DDLs bound to two separate data tables. The value selected on the first DDL will 'filter' out and display only related values in the second DDL. This much is working fine.

Now, what I need is to have the first DDL display a value passed through a session variable from a previous page on both DDLs so that the user begins an update session with valid current information. It shouldn't be so hard to accomplish but I haven't had much luck on this one, yet.

I have read a few threads on this forum but it isn't clear to me how to apply the statement:

.SelectedIndex = .Items.IndexOf(.Items.FindByValue(etc etc etc )

I'm not even working in a backcode environment as all my pages are inline coded.

Any help on this subject would be deeply appreciated.


a-c

 
Old May 19th, 2004, 04:56 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hello,

I'm not quite sure what you are referring by Session. Are you talking about the HTTPSessionState object, or the database session? You can use a DataView to filter out rows passed in to the second DDL, alternatively.

You can also do .SelectedValue = .Items.FindByValue(value)

Would you be able to post any code?

Thanks,

Brian




Similar Threads
Thread Thread Starter Forum Replies Last Post
Databound Dropdown fullingdale ASP.NET 2.0 Basics 2 June 20th, 2008 02:33 AM
asp databound dropdownlist kent ASP.NET 1.0 and 1.1 Basics 7 June 2nd, 2008 09:07 AM
how can selectedvalue of DDL make other DDL visibl hertendreef ASP.NET 2.0 Professional 4 May 20th, 2008 04:38 PM
VS2005 DataGridViewComboBoxColumn databound CloudDust Visual Basic 2005 Basics 4 October 12th, 2006 06:29 PM
databound headertemplate collie VB.NET 2002/2003 Basics 0 March 7th, 2005 10:31 AM





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