Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > Adobe Web Programming > Dreamweaver (all versions)
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) 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 September 22nd, 2005, 09:56 AM
Authorized User
 
Join Date: Sep 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default filtering data from a database using list box

i a have form with a asp.net list box populated with makes of cars ie. (acura, audi etc.). how can i bind that list box to a datagrid or repeater control in dreamweaver so that once user selects the make from the list box data grid will filter data with cars only of that selected make.

please help.
 
Old September 23rd, 2005, 02:57 AM
Authorized User
 
Join Date: Aug 2005
Posts: 68
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If You have ie a basic list of things in your case cars. So you can put a link with "go to detail page behavior (<a href="cars.aspx?carname=<%# cars.FieldValue("carname", Container) %>">audi</a>)" then on same page or a another pages you first make the dataset witch you make to filter by carname, then you can make the datagrid or datalist or normal repeat region of the dataSet and it will show only the cars that you select from the list


 
Old September 23rd, 2005, 03:45 PM
Authorized User
 
Join Date: Sep 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

can i do this on one page? instead of having pages for each make of the car.


 
Old September 23rd, 2005, 03:46 PM
Authorized User
 
Join Date: Sep 2005
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

can you please help me with this, please...

 
Old September 25th, 2005, 04:27 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Are there any specific areas you need help with?

Take a look at the Quick Start pages for ASP.NET that explain how to bind data to controls and how to use PostBack: http://samples.gotdotnet.com/quickst...bdatalist.aspx

If you set the AutoPostBack property of the drop-down with makes to True the page will reload when you select a new make. Inside the SelectedIndexChanged you can then get the new data from the database.

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Placing database items into a list box hookenbook Visual Basic 2005 Basics 2 January 14th, 2009 08:56 PM
Filtering Data from one Combo Box to another Steve1977 ASP.NET 3.5 Basics 1 September 14th, 2008 08:50 AM
multi-column list box values moved to 2nd list box sbmvr Access VBA 1 May 14th, 2007 01:58 PM
filtering files while displaying in list box anandthecoolest C# 1 March 8th, 2007 02:04 PM
filtering files while displaying in list box anandthecoolest C# 2005 0 March 8th, 2007 03:21 AM





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