Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #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. :)


 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 03:05 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.