简体   繁体   English

在 mvc3 中禁用部分视图

[英]disabling a partial view in mvc3

i have a simple view(A) which has 3 partial views(X,Y,Z) in it.我有一个简单的视图(A),其中有 3 个部分视图(X,Y,Z)。 A has a tab pane with 3 tabs. A 有一个带有 3 个选项卡的选项卡窗格。 and X,Y,Z are partial views which act as buttons.how ever these are not in和 X,Y,Z 是充当按钮的局部视图。但是这些不在

<button></button> tags. <button></button>标签。

they just appear as two partial views which have a image button in those partial views.它们只是显示为两个局部视图,在这些局部视图中有一个图像按钮。 what i want to do is disable/freeze these partial view like when a button is disabled when i navigate to another tab.我想要做的是禁用/冻结这些部分视图,例如当我导航到另一个选项卡时禁用按钮时。 please help me out here.请帮帮我。

thank you谢谢你

This should be done on the client and probably has little to do with Asp.Net MVC 3. Try something like this on the client (using JQuery).这应该在客户端上完成,可能与 Asp.Net MVC 3 几乎没有关系。在客户端上尝试这样的事情(使用 JQuery)。

$("#button").on('click', function (evt) { $("#partialView").hide(); });

Hopefully this helps.希望这会有所帮助。

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

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