Skip to content
Loading
Providing menu accessability depending on user login
0
  • Hi Santosh,
                   Thank you very much. it's working fine now. Really great job thanks.




    With Regards
    Ashwini
    0
  • Santhosh Kumar Jayaraman
    Sorry. I have attached correct file now
    0
  • Hi Santosh,
                   In the zip attached zip file i am unable to find any edited master page and other content pages, it contains only sisual stusio 2012 icon. please send me the edited pages. please check the file sent by you.


    With Regards
    Ashwini
    0
  • Santhosh Kumar Jayaraman
    In master.cs file, in page_load have the code which i said earlier
    0
  • Hi Santosh,
                   thanks for your replay.
      Find the file attached for menu. i have sent the master page and 3 content pages actually lot many content pages are there. i think master page is enough to refer. mainly i am using login.aspx page to give the menu access depending on user login. please refer the code and suggest me.


    With Regards
    Ashwini
    0
  • Santhosh Kumar Jayaraman
    post your code, please..It would be easy for us to suggest
    0
  • Hi Santosh,
                  i have not taken any label controls in menu. i am handling menu with unordered list of html. menu i have declared in master page. how to display it in content page. Suggest me
    0
  • Santhosh Kumar Jayaraman
    Just check the user role in page_load and make the menu visible/invisible.

    void page_load()
    {
    if (user.role=="Coordinator)
    {
          lbl_Menu1.Visible=true;
          lbl_Menu2.Visible=true; 
          lbl_Menu3.Visible=false;
    }
    else if   (user.role=="User)
    {
            lbl_Menu1.Visible=true;
          lbl_Menu2.Visible=false; 
          lbl_Menu3.Visible=true; 
    }
    else  if   (user.role=="Admin)
    {
            lbl_Menu1.Visible=true;
          lbl_Menu2.Visible=true; 
          lbl_Menu3.Visible=true; 
    }
    }

    like this you can make the menu items visible or hide.
    0