如何在MVC5中为DropDownList执行此操作? [英] How can I do this for DropDownList in MVC5?

查看:175
本文介绍了如何在MVC5中为DropDownList执行此操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有三个下拉列表。

1.Oganganisation

2.Department

3.Grades





我想在那个时候选择一个组织部门和等级下降如果我选择第二个组织取决于该组织部门并且应该更改等级下拉列表,那么应该填充下方列表吗?





可以任意一个给我带有演示代码的建议?



我知道如何使用json结果方法只对一个下拉列表进行级联。



谢谢

Hello to All,

I have three dropdownlists.
1.Organisation
2.Department
3.Grades


I want that when I select an organisation at that time department and grade drop down list should be populated, if I select 2nd organisation depend on that organisation department and grade drop down should be changed?


Can any one give me the suggestion with demo code?

I know how to do it with json result method for cascading only one drop down list.

Thanks

推荐答案

为此您可以使用jQuery回发事件。



关于索引操作方法,您可以获得组织的价值

然后在选择组织上,您可以进行回发以获取部门中的值

然后等级相同。



使用此链接您想要的相同类型的功能。
For this you can use jQuery postback event.

On index action method you can get the value of Organisation
then on select organization you can do a postback to get the value in departments
then same for Grade.

use this link same type of functionality you want.


这篇关于如何在MVC5中为DropDownList执行此操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆