Web Forms :: Hide Some Menu Items For Non Logged In Users In Menu Control

Apr 8, 2013

What I want is to show menu items Administrator or show user menu items.Show menu items using login...How I can do it with role  provider, control menu and siteMap in masterpage?

View 1 Replies


Similar Messages:

Web Forms :: Hide Menu Control Items Conditionally Based On Roles

Aug 12, 2013

I have written code for menu with web.sitemap and SiteMapDataSource1.I want to hide the admin panel if user has no admin rights.

How there is relation between sitemapdatasource,web.sitemap and menu.

<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" />
<asp:Menu ID="Menu" runat="server" DataSourceID="SiteMapDataSource1" Orientation="Horizontal"
OnMenuItemDataBound="OnMenuItemDataBound" onmenuitemclick="Menu_MenuItemClick" Width="100%">
<LevelMenuItemStyles>
<asp:MenuItemStyle CssClass="main_menu" />

[Code] .....

View 1 Replies

Web Forms :: Style The Menu Control To Allow The Menu Items To Float To The Right Of The Container?

Feb 3, 2011

Currently I have a menu control on my webform in ASP.Net 4.0 :

<div class="PNMenu">
<asp:SiteMapDataSource ID="PNSiteMap" runat="server" ShowStartingNode="false" />
<asp:Menu ID="PNMainMenu" runat="server" DataSourceID="PNSiteMap" RenderingMode="List" Orientation="Horizontal" CssClass="PN-PrimaryNavMenu" >
</asp:Menu>
</div>

I am trying to style the menu control to allow the menu items to float to the right of the container, however I am unable to do so as whenever I am styling the a, ul or li it keeps getting overidded by asp.net and floats everything left.

.PNMenu
{
clear:both;

[code]...

View 5 Replies

Web Forms :: Align Menu Items In Menu Control?

Jun 22, 2012

how to align the menu bar with proper space

View 1 Replies

VS 2013 ASPX Menu - Dynamically Adding Items Display Outside Menu Control

Apr 24, 2015

I have placed an aspx menu control on my master page with orientation as Horizontal. Below is HTML markup.

HTML Code:
<asp:Menu ID="mnuMedChem" runat="server" Orientation="Horizontal" Width="100%" OnMenuItemClick="mnuMedChem_MenuItemClick">
<DynamicHoverStyle CssClass="DynamicHover" />
<DynamicMenuItemStyle CssClass="DynamicMenuItem" />

[Code]....

I have tried populating the menus from my database by using the

Code:
mnuMedChem.Items.Add
and
Code:
mnuMedChem.FindControl(value).ChildItems.Add

The menu items and the childs are populating correctly but then the menu is not being displayed on the menu control.

View 4 Replies

AJAX :: Menu Control With Dynamic Url / Set The Menu Items As Enable/disable In Two Different Modes Say Edit/new?

Feb 22, 2010

I need a help in creating a vertical oriented Menu control with dynamic url's set in there Navigate Url property.Also i need to set the menu items as enable/disable in two different modes say edit/new.

View 1 Replies

VS 2008 - Menu Navigation Control - Spacing Between Menu Items

Jul 10, 2010

I added a menu avigation control in my page and i did this:

<div style="background-color: Maroon">
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" ForeColor="Black" Font-Bold="true"
BackColor="Chocolate">
<Items>
<asp:MenuItem Text="Home"></asp:MenuItem>
<asp:MenuItem Text="About Us"></asp:MenuItem>
<asp:MenuItem Text="Services"></asp:MenuItem>
<asp:MenuItem Text="Careers"></asp:MenuItem>
<asp:MenuItem Text="Contact Us"></asp:MenuItem>
</Items>
</asp:Menu>
</div>

but i cant give proper spacing between the menu items right now it is appearing like this: how to give proper spacing between the menu items them?

View 14 Replies

Web Forms :: How To Hide Menu Items

May 11, 2010

How can I hide some items in my menu if you are just a user & only appears if you log in as administrator? I would like to hide the siteadmin. Below is the code:

[Code]....

View 7 Replies

Web Forms :: Hide Sub Menu Items Based On Roles?

Jul 23, 2013

I have menu item on which come from website map. I have trimmed the main item of menu based on user roles.

Like i have one menu in which i have 5 reports i want to show 2 reports to agents and 5 reports to admin. how to apply roles on sub menu item.

View 1 Replies

Web Forms :: Run The Website, The Menu Wont Open The Sub-items Menu?

Jan 28, 2010

i'm working with asp.net visual studio 2008 c#i'm using Menu and i added items . the first item has like sub-items ...now when i run the website, the Menu wont open the sub-items menu ... this is the code :

<li style="direction: rtl"> <asp:Menu ID="Menu2" runat="server" BackColor="WhiteSmoke" BorderColor="White" ForeColor="#6699FF" Font-Bold="True" Height="361px" Style="left: 2px; position: relative; top: -9px; background-color: #ffffff" Width="194px"> <Items> <asp:MenuItem
NavigateUrl="~/CourseSignUp.aspx" Text="קורסי גלישה" Value="קורסי גלישה"> <asp:MenuItem Text="קורס ילדים עד גיל 18" Value="קורס ילדים עד גיל 18"> <asp:MenuItem Text="קורסים בקיץ" Value="קורסים בקיץ" NavigateUrl="~/CourseSignUp.aspx"></asp:MenuItem> <asp:MenuItem Text="קורס ימי שישי" Value="קורס ימי שישי"></asp:MenuItem> <asp:MenuItem Text="קורסים בחגים" Value="קורסים בחגים"></asp:MenuItem> </asp:MenuItem> <asp:MenuItem Text="קורס מבוגרים" Value="קורס מבוגרים"> <asp:MenuItem Text="קורס ימי שישי" Value="קורס ימי שישי"></asp:MenuItem> </asp:MenuItem> </asp:MenuItem> <asp:MenuItem Text="שיעורים פרטיים" Value="New Item"> </asp:MenuItem> <asp:MenuItem NavigateUrl="~/Rents.aspx" Text="השכרות" Value="Rents"></asp:MenuItem> <asp:MenuItem Text="מידע לגולש המתחיל" Value="New Item"></asp:MenuItem> <asp:MenuItem Text="לי קים" Value="New Item"></asp:MenuItem> <asp:MenuItem Text="תחזיות" Value="New Item" NavigateUrl="~/Forecasts.aspx"></asp:MenuItem> <asp:MenuItem Text="מאמרים" Value="New Item"></asp:MenuItem> <asp:MenuItem Text="הסטורית גלישה" Value="New Item"></asp:MenuItem> </Items> </asp:Menu> </li>

View 3 Replies

How To Show / Hide Custom Menu Items As Based On Roles

Mar 12, 2010

I have a custom menu, which leverages the standard asp.net sitemap. It works well but some of my pages are dynamically generated by URL rewriter, so they don't sit in the sitemap XML file. At the moment I rolled a custom solution which shows/hides menu items via CSS class and a programmatic check of the role that the user is in. It works ok until I visit a dynamic page that doesn't exist in the sitemap file. I've tried the "roles" attribute in the sitemap file with security trimming but it isn't working because I have a custom menu.

Is there a way I could leverage the roles attribute in the sitemap file to show/hide menu items for my custom control below, even when some pages are not in the sitemap? My menu control is below...

<div class="menu">
<ul>
<asp:Repeater ID="rpt" runat="server" DataSourceID="smdsMenuPrimary"
EnableViewState="False">
<ItemTemplate>
<li class="<%#GetDisplayClass((SiteMapNode)Container.DataItem)%>"><a href='<%# ((SiteMapNode)Container.DataItem).Url %>'><%# ((SiteMapNode)Container.DataItem).Title %></a></li>
</ItemTemplate>
</asp:Repeater>
</ul>

View 1 Replies

Security :: How To Disable Menu Items For Selected Users

Feb 4, 2011

I have a menu with 3 Items; Home, Begineers and Experts. Menu is implemented in a masterpage and I build 3 more separate webpages which inherit the master.Userneeds to login and I store the User category in a Session["Category"].Can I disable the menu item "Expert" depending on the Session["Category"]? ( that is need to disable the menu when category is not equal to Expert)

View 2 Replies

Web Forms :: Menu And Menu Items For Navigation?

Jun 16, 2010

I'm using asp.net and css to style a master page with navigation at the top. I was hoping to add the login status control in as a menu item but it is not allowed. Can someone point me in the right direction? When I post my code on this forum do I have to include tags?

View 4 Replies

C# - Menu Displaying Different Menu Items Depending On Access Level

Jul 9, 2010

I'm trying to create an asp menu for a website. The site will have 2 levels of user Master users (which will have more options) and Sub users which will have limited menu options.

I was wonder does anyone knows if a way to hide menu items? I've tried google but I can't really find much.

Here's the Asp code

[Code]....

I have worked out how to hide the whole menu when the user is not logged in

MainMenu.Visible = false

View 1 Replies

Security :: Lock Down Certain Sitemap Menu Items Based On The Users Role ?

Jan 21, 2010

My web app has 3roles, I need to lock down certain sitemap menu items based on the users role and what I'm using isn't working.

my roles are Supervisor, manager, and User.

[Code]....

I only want those roles to see those menu options, I do not want someone with a user role to see those options at all. Currently if I log into my site with a user role, I'm seeing everything on the menu (via the sitemap).

View 5 Replies

Web Forms :: Hide Nodes In Menu Control?

Nov 12, 2010

I have the following Menu control:

[Code]....

How do I hide the root node and some other nodes if I do not want it to show on the navigation menu?

View 15 Replies

User Controls :: Disable Or Enable Menu Items Based On Login Type Of Logged In User

Jun 6, 2013

I have table called ROLE with fields (id,name,permission) example values (1001,madhu,hr)

I have another table called LOGIN with fields(id,DOB,password) example values(1001,24101989,madhukumar)

What i want is , if i login using the LOGIN table ,it  check the  id and permission in the ROLE table , if the permission is 'hr' it enable to access the menu , or if the permission is any other it just print the error message ("no permission")

Note: menu is placed in master page , but login is not in the master page ...

View 1 Replies

Web Forms :: How To Hide Manage SiteMapNode In Menu Control

Feb 5, 2011

How can i have a menu control that Manage SiteMapNode from the menu to hide and Just when admin logged to see it.

[Code]....

View 1 Replies

Web Forms :: Menu Control Not Showing Submenu Items?

Aug 22, 2010

I have for example a ASP Menu control having a static (File) and dynamic (Open, New) menu such as :

[code]....

I am able to see this menu under VS 2008 under my development PC. But when I deploy the app to a IIS server, and run the app, the whole app appeared the same. Only the Menu has "File" for selection but the submenu items (Open and New) did not appear when the mouse cursor was moved over "File". Only the Outline of the dropdown box of the submenu appeared.

View 2 Replies

Web Forms :: Add/Remove Default Classes From The Menu Generated From The TreeView Or Menu Control

Apr 5, 2010

Is there a way to add/delete/update the default classes (for instance AspNet-Menu-WithChildren,AspNet-Menu-NonLink ) of the html generated by the asp.net menu or treeview control? I am using CSSAdapters so the menu control renders in a list format instead of table format.

View 1 Replies

Web Forms :: Change Background Color Of Selected Menu In Menu Control?

Jul 15, 2013

i have a asp menu in master page and it is populated from database. 

i want if user click a link that menu link's background color should change how to do?  

View 1 Replies

Web Forms :: Save Data While Changing Menu / Place The Menu Control In The Mater Page?

Mar 17, 2010

We have to develop an application which has a Vertical left pane menu control which displays all the web pages (A,B,C say). Now if user is in page A and filled some data and clicks on menu control to go to page B, all the data in page A needs to be saved. Also if all the required field in page A are not filled and user navigated to page B, there will be one ! sign after the menu so that user can understand that there some some more fields need to be filled up.

We are planning to place the menu control in the Mater page. Please give me some direction to do this. My question is:

1. If user change menu (In Master Page), how should we save data?

2. How should we display the ! in the menu control?

View 2 Replies

Web Forms :: Menu Control - Does Not Render Image On Dynamic Menu

Sep 2, 2010

I am doing a rework on one of my sites and I am attempting to use the asp:menu control.

I am using images in the static and dynamic menus. Hard coded at this point.

On my local machine it works fine but when I upload to the server, the image on the dynamci menus do not appear.

Instead I just get white space where the images should be.

Here is the code:

[code]

View 2 Replies

Web Forms :: Display A Context Sensitive Menu Using Menu Control?

Jul 28, 2010

I know that the code depicted below will not work but I am including it to convey the idea of what I wish to accomplish. I want to use a different SiteMap to construct the menu on the displayed page for each of three different classes of service (COS).

I set a session variable named "COS" at the login and want to test its value prior to rendering each page. I want to display a menu based upon the appropriate COS. Here is my first stab at it but I know that I cannot include <asp:...> controls within the "case" statements. Can anyone suggest methods of doing this? I know C# and can use that but I do not know how to select the proper sitemap within the <menu> control. I am also using a CSS in my production version.

[Code]....

View 2 Replies

Web Forms :: Menu Item Click Event For Menu Control

May 7, 2015

Sitemap & Menu:

<asp:SiteMapDataSource ID="Menu" runat="server" ShowStartingNode="false" />
<asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" OnMenuItemDataBound="OnMenuItemDataBound" DataSourceID="Menu" >
<LevelMenuItemStyles>
<asp:MenuItemStyle CssClass="Menu" />
<asp:MenuItemStyle CssClass="Level" />
</LevelMenuItemStyles>
</asp:Menu>
<siteMapNode url="javascript:Logout" title="Logout" description="Logout" roles="*">
<siteMapNode title="Logout" description="Logout"></siteMapNode>
</siteMapNode>

I want OnClick event instead of navigation .

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved