在mvc4中启用和禁用来自控制器的按钮 [英] enable and disable buton from controller in mvc4

查看:73
本文介绍了在mvc4中启用和禁用来自控制器的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是mvc的新手,

i希望根据我从数据库获取的条件启用和禁用控制器按钮。



甚至我希望隐藏和显示一些文本框和按钮基于条件,但通过控制器。

I am new in mvc,
i want to enable and disable button from controller based on condition i get from database.

even i want to hide and visible some textboxes and button based on condition but through controller.

推荐答案

只需你可以对控制器进行ajax调用,并在该方法成功时编写jQuery根据数据库的结果来显示/隐藏控件。



我可以有多种方案,所以首先要详细说明已编码的内容或分享您的详细要求。这样我们可以更好地帮助您。
Simply you can make ajax call to controller and write jQuery on success of that method to show/ hide controls as per the results came from database.

There can me multiple scenarios, so first give the details what already you have coded or share your detailed requirements. So that we can help you better.


这篇关于在mvc4中启用和禁用来自控制器的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆