简体   繁体   English

根据文本框的值自动填充2个下拉列表的值

[英]auto populate the value of 2 dropdowns based on the textbox value

I have 1 table in my database with employee name, department name and branch name. 我的数据库中有1个表,其中包含员工姓名,部门名称和分支机构名称。 now i want, when employee enter his name in name field then the corresponding department and branch name values will auto populate in the respective drop-down. 现在我想要,当员工在名称字段中输入他的名字时,相应的部门和分支机构的名称值将自动填充在相应的下拉列表中。 how to do it in Dot Net MVC? 在Dot Net MVC中如何做?

You should use ajax and a corresponding function in the controller. 您应该在控制器中使用ajax和相应的功能。

for further reading & sample code 进一步阅读和示例代码

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM