f40
f40

Reputation:

Cascading Dropdownlist

I am using many dropdownlists on my page,and i am migrating my project from .net 2003 to .net 2008.I want to Ajaxify my page and is it logical to use cascading dropdownlists?Can Cascading Dropdownlist give any unexpected problem?By the way,if i use Cascading Dropdownlist,i use pagemethods,not webservices?Do Pagemethods give any problems?Or Do u have advice instead of Cascading Dropdownlist?I dont want to use 3.party components annd thanks for ur help.

Upvotes: 0

Views: 710

Answers (4)

punnam
punnam

Reputation: 1

@using (Html.BeginForm("Index", "Home", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { id = "LoginForm", autocomplete = "off" }))

Upvotes: 0

punnam
punnam

Reputation: 1

routes:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace PrivateExchange
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
            routes.MapRoute(
                name: "MediaResourcePopup",
                url: "Home/MediaResourcePopup/{wid}/{uiconf_id}/{cache_st}/{entry_id}/{targetId}",
                defaults: new
                {
                    controller = "Home",
                    action = "MediaResourcePopup"
                });

            //routes.MapRoute(
            //name: "BridgeFront",
            //url: "{BridgeFront}/{LaunchBridgeFront}/{user}",
            //defaults: new { controller = "BridgeFront", action = "LaunchBridgeFront", user = "keenan" }
            //);


            routes.MapRoute(
               name: "Message",
               url: "Message/{action}/{id}",
               defaults: new { controller = "Message", action = "Index", id = UrlParameter.Optional }
           );
            routes.MapRoute(
                name: "Plan",
                url: "Plan/{action}/{id}",
                defaults: new { controller = "Plan", action = "Index", id = UrlParameter.Optional }
            );

            routes.MapRoute(
                name: "Enrollment",
                url: "Enrollment/{action}/{id}/{memberCodes}",
                defaults: new { controller = "Enrollment", action = "Index", id = UrlParameter.Optional, memberCodes = UrlParameter.Optional }
            );

            routes.MapRoute(
                name: "UserManagement",
                url: "UserManagement/{action}/{id}",
                defaults: new { controller = "UserManagement", action = "Index", id = UrlParameter.Optional }
            );

            routes.MapRoute(
                name: "Employee",
                url: "Employee/{action}/{id}",
                defaults: new { controller = "Employee", action = "Index", id = UrlParameter.Optional }
            );

            routes.MapRoute(
                name: "Dependent",
                url: "Dependent/{action}/{id}",
                defaults: new { controller = "Dependent", action = "List", id = UrlParameter.Optional }
            );
            routes.MapRoute(
                name: "DecisionSupport",
                url: "DecisionSupport/{action}/{id}",
                defaults: new { controller = "DecisionSupport", action = "Index", id = UrlParameter.Optional }
            );
            routes.MapRoute(
                name: "Package",
                url: "Package/{action}/{id}",
                defaults: new { controller = "Package", action = "List", id = UrlParameter.Optional }
            );

            routes.MapRoute(
                name: "Home",
                url: "Home/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional,type=UrlParameter.Optional }
            );

            routes.MapRoute(
               name: "KCaresHome",
               url: "Home/{action}",
               defaults: new { controller = "Home", action = "Login", type = UrlParameter.Optional }
           );

            routes.MapRoute(
                name: "Root",
                url: "{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );
            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
            );

            routes.MapRoute(
                name : "SSO",
                url : "SSO/SSO/{id}",
                defaults: new { controller = "SSO", action = "SSO" }
                );

            routes.MapRoute(
                name: "Upload",
                url: "Upload/{action}/{id}",
                defaults: new { controller = "Upload", action = "Index", id = UrlParameter.Optional }
            );

 1. List item

enter code here
        }

}

Upvotes: -2

womp
womp

Reputation: 116987

The only thing that I can say against Cascading dropdownlists is that they can be harder to debug if something goes wrong with the WebMethod they are calling, as they will only return cryptic error messages. However, once you realize that that's what's happening, it's a pretty quick step to fix it.

Otherwise, they work great, and save a whack of plumbing code to enable/disable.

Upvotes: 1

Jonathan Parker
Jonathan Parker

Reputation: 6795

There's nothing wrong with the ASP.NET AJAX Toolkit. It works. If you're not using the same dropdowns on another page then use a pagemethod they're much easier.

Upvotes: 2

Related Questions