禁用下拉列表 [英] Making dropdown list disabled

查看:66
本文介绍了禁用下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有一个使用c#动态创建的下拉列表.我必须根据页面权限将其设置为只读,但是如果我将该属性设置为禁用,则可以通过单击F12并删除该属性来覆盖它.请帮我

Hi Guys,

I have a dropdown list which is created dynamically using c#. I have to make it readonly based on page permission but if i set the property to disabled it can be over ridden by clicking F12 and deleting that property.. Is there any way to prevent it??? Please help me out

推荐答案

首先.下拉列表始终为只读!

防止F12窍门的唯一方法是,如果用户没有权限,则不要填充任何选项.或仅填充允许用户看到的1选项.
您可以动态创建它,因此应该很容易做到.
First of all. A dropdownlist is always readonly!

The only way to prevent the F12-trick is to not populate any options if the user does not have permissions. Or only populate the 1 option the user is allowed to see.
You create it dynamically, so this should be easy to do.


这篇关于禁用下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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