开发者

Restricted access for usercontrol by role

is possible to limit access for particular usercontrol for particular role?

I have page (default.aspx) 开发者_高级运维that load (also) info.ascx

I wanto to restricted access to info.ascx and display a message like 'unauthorized' where he was to be loaded.

thanks!


There is nothing inbuilt in ASP.Net. You would have to implement your own access control using the Role providers and Custom user controls.


You can use

<authorization>
    <allow users="user1, user2"/>
    <deny users=”?”/>
</authorization>

This article may help: http://www.codeproject.com/Articles/301324/Authorization-in-ASP-NET

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜