Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 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
  #1 (permalink)  
Old January 12th, 2007, 01:21 AM
Registered User
 
Join Date: Sep 2005
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default ASP.NET AJAX

Hello...

Can someone guide me how to get a Cascading Dropdown box in ASP.NET AJAX working in a web application.

The requirement is like this..there will be two Dropdownlist...one should be filled with Country. On selecting the first list the second list has to populate the cities ,which is taken from a database.

I tried the video on ASP.NET site. I tried a few other sites too...but not of much help. If someone has already done it or knows a site where i can refer I wouldbe thankful.

I have installed the framework and got some basic controls working.

Thank you

Rajesh,India

  #2 (permalink)  
Old January 12th, 2007, 02:26 PM
Authorized User
Points: 333, Level: 6
Points: 333, Level: 6 Points: 333, Level: 6 Points: 333, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Fresno, California, USA.
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
Default

For what you are trying to do you can either do it by hand which would encompass too much of this post writing out AJAX by hand or you can use MS AJAX (used to be Atlas).
using MS AJAX is easier and involves you installing the MS AJAX framework along with the toolkit that contains cascading dropdowns. Inside the sample site in the toolkit it shows how to use it that comes with it and you can load it up in VS.

Cut and dry, you will need to build a web service that will access the datasource that contains the data you are cascading. The service should contain the methods to return what the list should show for each condition. The videos are hard to understand and it is easier to look at the sample website as it shows you all the methods and properties for their control and you can look at the source to see how they did it.

  #3 (permalink)  
Old January 13th, 2007, 12:30 AM
Registered User
 
Join Date: Sep 2005
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you Quick209 !

Yes, I am using ASP.NET AJAX...

Can't we call the function directly from a page with out using Web Services. If we are to use Cascading Dropdowns do we have to use webservices always ..? My concern is because I have not tried web services so far!!

Rajesh

  #4 (permalink)  
Old January 19th, 2007, 03:42 PM
Authorized User
Points: 333, Level: 6
Points: 333, Level: 6 Points: 333, Level: 6 Points: 333, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2005
Location: Fresno, California, USA.
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It will require a service and I believe they have a video sample of it on their site using it that doesn't go too entailed. The default VS builds you for the web service will do for the headers. Just need to create the method. You can use 1 web service with multiple methods for the whole thing. You don't need to register the service with the server, you just need the ASMX registered with the site through the MSAJAX script manager and then tell the cascading drop down what to do with it. I will look through some of the things I made at work and post a short example later on how to build this but it is easier than you think it is. :)




Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 2.0 Ajax raminriahi General .NET 2 September 5th, 2007 12:48 PM
Turning a regular ASP.NET App into an AJAX ASP.Net donrafeal7 Ajax 2 August 31st, 2007 12:33 AM
ajax in asp.net imjayakumar Crystal Reports 0 April 3rd, 2007 07:26 AM
Asp.net ajax everest General .NET 0 March 8th, 2007 12:21 AM
using AJAX in ASP.Net muskaanbajaj ASP.NET 1.0 and 1.1 Professional 3 February 24th, 2006 05:38 AM





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