Quantcast
Channel: Security
Viewing all articles
Browse latest Browse all 4737

Different menu bar for different roles

$
0
0

I am new to ASP.Net and i am trying to get a feature working for a app i am trying to build.

I have 2 roles and I need them to view 2 menus i have created in the site.master.

There are no dynamic pages in the app. So i am thinking maybe in the .vb file for each static page something like this;


' If User.IsInRole("ABC") Then
' UpdatePanel1.Visible = True
' UpdatePanel2.Visible = False
'Else
' UpdatePanel1.Visible = False
' UpdatePanel2.Visible = True
'End If

The problem was am having is something about requiring a script manager. Now that I have included the script manager i am getting an error  UpdatePanel1 is not declared. It may be inaccessible due to its protection level.

I put the script manager in the site.master like this;

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>
<asp:Menu ID=

 <Items>

<asp:MenuItem AAA

 </Items>

</asp:Menu>

</ContentTemplate>

 </asp:UpdatePanel>

<asp:UpdatePanel ID="UpdatePanel2" runat="server">

<ContentTemplate>
<asp:Menu ID=

 <Items>

<asp:MenuItem BBB

 </Items>

</asp:Menu>

</ContentTemplate>

 </asp:UpdatePanel>

Can anyone suggest a possible cause for this error?


Viewing all articles
Browse latest Browse all 4737

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>