如何在不使用Ajax更新面板的情况下制作两个链接的下拉菜单? [英] How to make two chained drop down menus without using Ajax update panel?

查看:72
本文介绍了如何在不使用Ajax更新面板的情况下制作两个链接的下拉菜单?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的开发人员,

我正在一个项目中,我应该制作两个下拉菜单而不使用Ajax更新面板因为它会抛出许多html文件",并且两个下拉菜单相互连接,从而基于下拉菜单的值down1,下拉列表2应该被填充,这两个都从数据库中填充...

Dear Developers,

I am working on a project where I should make two drop down menus without using Ajax update panels ''as it throw many html files'' and the two drop down menus are connected to each others such that, based on the value of the drop down1, the drop down 2 should be populated, both of them are populated from database...

推荐答案

如果不更新面板,那么您需要使用传统的AJAX- XMLHttpRequest .
参考:
面向初学者的AJAX(第2部分)-使用XMLHttpRequest和jQuery AJAX实施级联下拉列表 [ ^ ]



您可以使用回调与服务器对话并获取数据.
参考:
MSDN:ASP.NET级联下拉列表 [ Web应用程序的ClientCallback自定义控件 [
If not update panels, then you need to use traditional AJAX - XMLHttpRequest.
Refer:
AJAX for beginners (Part 2) - Using XMLHttpRequest and jQuery AJAX to implement a cascading dropdown[^]

OR

You can use Callback to talk to server and get data.
Refer:
MSDN: ASP.NET cascading drop-down-list[^]
ClientCallback custom control for web applications[^]


这篇关于如何在不使用Ajax更新面板的情况下制作两个链接的下拉菜单?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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