Author: CarCan | Posted on: 12/9/2008 6:55:32 AM | Views : 420

There is a TabContainer with several TabPanel controls within it.
These are inside a LoginView control.
What I'm looking to do is add a tab programatically based on the role of the user.

I have this working on a test page that contains nothing but the TabContainer/TabPanel and in the codebehind page I have the following code:
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Roles.IsUserInRole("Admin"))
        {
            AdminTab.Visible = true;
        }
    }
On the test page, the code is:
    <cc1:TabContainer ID="TabContainer1" runat="server">
   
    <cc1:TabPanel ID="Panel1 ...

Go to the complete details ...