We are using the Ajax TabContainer and would like to hide and show actual tabs depending upon the users role / permission level.
or de-activate the tab if they don't have the correct user role privilages.
e.g.
suppose we have a normal user and a superuser and we want normal users to view tab1 only and superusers to view both tab1 and tab2.
de-activates (greys out) a tab when you uncheck the <input id="ctl00_SampleContent_showComponents" name="ctl00$SampleContent$showComponents" checked="checked" type="checkbox" />
box. - not sure if this works based on the users role or not?
We can hide and show actual content inside the tabbed area, but not sure if it's possible to hide and show the actual tab itself?
sypa
Member
139 Points
177 Posts
Ajax tab container - can the tabs be hidden/shown based on a user role?
Feb 26, 2013 02:23 PM|LINK
We are using the Ajax TabContainer and would like to hide and show actual tabs depending upon the users role / permission level.
or de-activate the tab if they don't have the correct user role privilages.
e.g.
suppose we have a normal user and a superuser and we want normal users to view tab1 only and superusers to view both tab1 and tab2.
this example here (top of page):
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/Tabs/Tabs.aspx
de-activates (greys out) a tab when you uncheck the <input id="ctl00_SampleContent_showComponents" name="ctl00$SampleContent$showComponents" checked="checked" type="checkbox" /> box. - not sure if this works based on the users role or not?
We can hide and show actual content inside the tabbed area, but not sure if it's possible to hide and show the actual tab itself?
thanks,
mark.
sypa
Member
139 Points
177 Posts
Re: Ajax tab container - can the tabs be hidden/shown based on a user role?
Feb 26, 2013 02:56 PM|LINK
If Roles.IsUserInRole("normalUser") Then myTabName.Visible = False End Ifchetan.sarod...
All-Star
65749 Points
11148 Posts
Re: Ajax tab container - can the tabs be hidden/shown based on a user role?
Feb 27, 2013 02:37 AM|LINK
Hey,
You probably need to do this in the codebehind.
I presume that ajax tab has a visible property that you can set to false then you code would be something like:
(in page_load)
if (Roles.IsUserInRole("Normal")) { nameOfYourTab.Visible = False; }Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.