ASP.NET Web 移动应用程序中的选择列表控件出现问题

发布于 2024-09-13 10:52:36 字数 318 浏览 3 评论 0 原文

我正在尝试将 ASP.NET Web 移动应用程序中的单页开发为 C# 背后的代码。 我在页面上使用了移动选择列表控件。它有项目 1,2,3,4,5,6,7,8...20。我希望它应该将选择控件的选定值分配给位于页面(移动表单)上的移动标签控件。据我所知,我必须在代码后面的 OnSelectIndexChanged 事件上对此进行编码。好的?但没有发生这样的事情。我已经在代码后面写了方法(事件)。我不想编写 javscript 或 .aspx 代码(不需要任何客户端代码)。我想在后台代码上执行功能。我应该如何实现这一点?我发现 Mobile 工具包的选择列表控件不会生成服务器端事件。

我必须做什么?

I am trying to develop the single page in asp.net web mobile application as code behind c#.
I have took the Mobile select list control on page.It has items, 1,2,3,4,5,6,7,8...20. I want it should be assign the selected value of select control to mobile label control situated on page (Mobile Form). As per i know I have to code this on OnSelectIndexChanged Event at code behind. ok? but nothing like this happening. I have written the method (Event) on code behind. I don't want to write javscript or on .aspx code ( not want any client code). I want to conduct functionality on code behind. How should I can achieve this.? As I found Select List control of Mobile toolkit not generates the server side event.

What I have to do?

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

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

发布评论

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

评论(1

滴情不沾 2024-09-20 10:52:36

您需要在选择列表控件中设置 AutoPostBack=true 才能触发 OnSelectedIndexChanged 事件。

编辑:

在 Google 上查找了 30 秒,我发现选择 SelectionList 中的项目不会触发服务器事件。

查看MSDN 文档 有关如何引发服务器响应的示例。

You need to set AutoPostBack=true in your select list control in order to fire the OnSelectedIndexChanged event.

EDIT:

In looking on Google for 30 seconds, I discovered that a selection of an item in the SelectionList does not fire a server event.

Look at the MSDN documentation for a sample on how to raise a server response.

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