简体   繁体   English

非JavaScript版本的asp.net页面的下拉菜单回发?

[英]Drop-down menu postback for non-JavaScript version of asp.net page?

I currently have two dropdown menus, and one gets filtered when the user selects a value from the other. 我目前有两个下拉菜单,当用户从另一个菜单中选择一个值时,一个菜单将被过滤。 But I will also need to support a non-javascript version and am wondering how to achieve a postback via onselectedindexchanged? 但是我还需要支持非JavaScript版本,并且想知道如何通过onselectedindexchanged实现回发吗? I know that i can't use the AutoPostBack property for example, so how can this be achieved? 我知道我不能使用例如AutoPostBack属性,那么如何实现呢?

Thanks. 谢谢。

You can't use the post-back features (which SelectedIndexChanged is one) of ASP.Net and have javascript disabled. 您不能使用ASP.Net的回发功能( SelectedIndexChanged是其中之一)并且禁用了javascript。 ASP.Net and WebForms have a tight coupling with javascript to perform most all its posting functionality including some basic things like maintaining ViewState . ASP.Net和WebForms与javascript紧密耦合,可以执行其所有大部分发布功能,包括维护ViewState类的一些基本功能。

If disabled javascript is a requirement, you might want to consider using an MVC approach, but even that will still be a very limited web user experience. 如果需要禁用JavaScript,则可能要考虑使用MVC方法,但是即使那样,这仍然是非常有限的Web用户体验。

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

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