如何创建包含角色(管理员或非管理员)下的控件的 ASP.NET 4.0 页面

发布于 2024-09-10 18:13:29 字数 122 浏览 1 评论 0原文

我想使用 ASP.NET 4.0 (C#) 构建网页,并且我希望为管理员角色显示一些控件。并对普通用户消失。

我建议使用(多视图)标准控制!

问题是:这个方法完美吗?或者还有很多更好的方法可以应用?

I want to build web pages using ASP.NET 4.0 (C#), and I want some controls to be appear for the admin role for example. And disappear for the normal user.

I suggested the (Multiview) standard control!

The question is: Is this method PERFECT? or there are many better methods to apply?

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

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

发布评论

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

评论(1

你与昨日 2024-09-17 18:13:29

除非在 ASP.NET 4.0 中引入了某种新的方法来执行此操作,否则这是执行此操作的正确方法,这正是 MultiView 控件的设计目的。

Unless some new way of doing this has been introduced in asp.net 4.0 then this is the correct way of doing this, it is exactly what the MultiView control was designed to do.

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