I have master and master detail form in my project in asp.net using c#. I want to enable and disable it according to user who is logged in. For Example if user is admin then he can see all the forms, if user is supervisor then he can see some master and some master-detail form and so on.
How I can do it?
Loading
Iftikar HussainPosted Jul 11, 2013, 11:00 AM
All your form (including Master) are in a single ASPX page? if yes then in code behind during page load you check the role for current logged in user and set visible true or false.
if(User.Role=="supervisor")
{
form1.Visible=false;
formMasterAdmin1.Visible=false;
}
by default set visible=true for all forms. so that when admin log in he can see all forms
Regards,
Iftikar