Any sample C#? i have googled but couldn't the correct one
Particular role log in.. they can readonly the page.
You can go for web config file and metion the location for particular roles and deny anonymous user.
<location path="securedpage.aspx > <system.web> <authorization> <allow users="user1,user2,etc" /> <allow roles="role1,role2, etc" /> <deny users="*" /> //here * will deny anyone other than in allowed or you can also specify users individually whom you want to deny </authorization> </system.web> </location>