使用 jQuery Mobile 未触发代码隐藏事件

发布于 2024-12-25 14:34:44 字数 295 浏览 5 评论 0原文

我正在尝试使用 ASP.Net 和 jQuery Mobile 创建一个移动页面。到目前为止,UI 看起来很棒,但由于某种原因,像 asp:DropDownList 这样的控件永远不会触发由我的代码后面处理的 selectedIndexChanged 事件。

我知道我可能应该使用 ASP.Net MVC,但我从未在 MVC 中做过项目,而且这个项目只是一个时间表很短的模型。有什么方法可以让后面的代码中的代码触发吗?

我已经尝试将 ajaxEnabled 设置为 false 并在母版页的表单标记上设置 data-ajax='false' 。

I'm trying to create a mobile page using ASP.Net and jQuery Mobile. The UI looks great so far, but for some reason controls like asp:DropDownList never fire their selectedIndexChanged events to be handled by my code behind.

I know I should probably be using ASP.Net MVC but I've never done a project in MVC yet, and this project is just a mock up with a short timetable. Is there some way to get the code in the code behind to fire?

I've already tried setting ajaxEnabled to false and settings data-ajax='false' on the master page's form tag.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

沉鱼一梦 2025-01-01 14:34:44

你的下拉列表有 AutoPostBack=true 吗?

Does your dropdownlist have AutoPostBack=true?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文