.Net UpdatePanel 和 javascript 已禁用

发布于 2024-09-10 09:15:03 字数 417 浏览 0 评论 0原文

这可能听起来,或者实际上是,一个愚蠢的问题,但我需要找到最好的方法来继续我正在进行的项目。我有一个多页网络表单,使用多视图控件。该多视图位于更新面板控件中,到目前为止一切正常。

我的问题是关于禁用 JavaScript 的用户。我注意到,在这种情况下,当用户单击按钮转到下一页时,我只剩下一个正常的多页面表单,其中页面导致回发,页面刷新,并且用户处于打开状态下一页。所以基本上看起来更新面板足够聪明,可以回退到正常的回发。

更新面板中的任何内容都应该是这种情况吗?我问这个问题是因为在更新面板中我有几个面板可以根据其他选择打开和关闭。例如,如果用户选择他们在美国境外,我会显示更多国际信息面板。当 javascript 被禁用时,这种情况就不会发生。

如果这是它应该工作的方式,我只需要为禁用 javascript 的用户想出一些办法。

感谢您的任何帮助。

This may sound, or actually be, a stupid question but I need to find the best way to proceed with a project I am on. I have a multipage webform, using the multiview control. That multiview is in an updatepanel control, and everything works great so far.

My question is about users with javascript disabled. What I have noticed is that in this scenario, when a user clicks the button to go to the next page, I am just left with a normal multi page form, where the page causes a postback, the page refreshes, and the user is on the next page. So basically it looks like the updatepanel is smart enough to fall back to just normal post backs.

Is this supposed to be the case for anything in an updatepanel? I ask because within the updatepanel I have several panels that get turned on and off based on other selections. For example if a user selects they are outside of the US, I show additional panels for international info. That is not happening when javascript is disabled.

If this is the way it is supposed to work I'll just have to figure something out for users with javascript disabled.

Thanks for any help.

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

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

发布评论

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

评论(1

无边思念无边月 2024-09-17 09:15:03

.NET 组件应该自动处理 JavaScript 被禁用的情况。但是,对于更新面板中的面板,如果您使用 JavaScript 来刷新或更改它们,这显然不起作用。 (由于您有 AJAX 标记,我假设您在这里使用 JavaScript。)

当然,需要考虑的一件事是您的用户。大多数人都使用 JavaScript 浏览网页。对于这种情况,您可能不需要支持,只需说“请启用 JavaScript”即可。

The .NET components should automatically handle situations where JavaScript is disabled. However, in the case of the panels within the update panel, if you are using JavaScript to refresh them or change them, this will obviously not work. (Since you have the AJAX tag, I am assuming you are using JavaScript here.)

Of course, one thing to consider is your users. Most people browse the web with JavaScript on. This may be a case you don't need to support other than saying, "Please enable JavaScript."

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