.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Hide li of Ul in menu??

Posted By:      Posted Date: August 25, 2010    Points: 0   Category :ASP.Net


   is it possible to hide certain Li of an Ul and show them at certain page???


<ul class="ProfileMenu">
                                    <li><a class="linkbutton" href="<%=ResolveUrl("~/")%>Home.aspx">Home</a></li>
                                    <li><a class="linkbutton" href="<%=ResolveUrl("~/")%>RegCustomers/CEditProfile.aspx">
                                        Edit Profile</a></li>
                                    <li><a class="linkbutton" href="<%=ResolveUrl("~/")%>RegCustomers/CChangePassword.aspx">
                                        Change Password</a></li>
                                    <li><a class="linkbutton" href="<%=ResolveUrl("~/")%>RegCustomers/CChangePassword.aspx">
                                        View Purchase Detail</a></li>    

suppose i have this(above) in master page.

now when user navigate to certain page then i want to show all LI otherwise just First LI to be visible???

plz guide me..

View Complete Post

More Related Resource Links

Hide top menu search bar in Sharepoint server 2010

Hi I've tryed this guide to hide the top menu search bar with Sharepoint Designer in Sharepoint server 2010 ------------------------------ Open SharePoint Designer          Open the site in SharePoint Designer   On the left navigation pane, click on “All Files” (bottom item on menu)   Click on the folder “_catalogs”   Click on the folder “masterpage”   Click on the file “v4.master” An overview will open Make sure that you have selected “Split mode” viewing          Click on “Edit file” (I hope this is correct, because I have a Dutch version)          Select “Skewer click” on the ribbon          When you click on a item, you are presented with a submenu. Select in this case, the Help-button, “a#TopHelpLink” For the Search-field, you have to select “div#s4-searcharea.s4-search s4-rp”.          In the code properties screen, on the right side, select Style          And set visibility to “hidden”   Save your master file. ------------------------------ But it dosn't work, it puts a little red line under "hidden", Like if y

how to hide site actions menu

Hey, Just wondering if anyone can help me try and hide the Site Actions menu either by using a HTML Form Web Part or changing the master page. Cheers

Hide Site Actions menu for few groups on a specific aspx page.


Hi All Gurus,

I am facing a issue. I want to hide the site actions menu to few groups, which have high level permission on other pages but they dont need to access "site actions" link on only this page.

Can some one tell me a why using Javascript or some quci fix for this in SPD level.

Pls looking forward for your help...

Happy Sharepointing..


Hide context menu except workflows

I have added 3 lists as 3 web parts in a page.I have to hide context menu(View Properties,Edit Properties,Alerts,Workflows,Send To,Manage Permissions,Compliance Details and Delete) except workflows only for 1 webpart for particular users.Please help me out in this regard...It's very urgent.

How to Hide the Ribbon and Site Actions Menu for Anonymous Users in SharePoint 2010?


How to Hide the Ribbon and Site Actions Menu for Anonymous Users in sharepoint2010?


any thoughts?

Thanks in Advance!

Share Knowledge and Spread Love!

Hide a node from appearing on menu not on breadcrumb (using SqlSiteMapProvider)



I am using wicked code sqlsitemapprovider and it's VB version. Most of the things are going OK! But when I wanted to hide some of the nodes from appearing on menu while staying shown on sitemappath I cannot figure it out. I tried to change the sqlsitemapprovider code but was unsuccessfull. I have found David Sussman's answer. but it was for a .sitemap file. So how can I manage to do the same with the sql sitemap provider mentioned above.

I added a column named visible to my SiteMap table it's type is bit and then I have done these changes (Sorry for such long code):

Imports System
Imports System.Web
Imports System.Data.SqlClient
Imports System.Collections.Specialized
Imports System.Configuration
Imports System.Web.Configuration
Imports System.Collections.Generic
Imports System.Configuration.Provider
Imports System.Security.Permissions
Imports System.Data.Common
Imports System.Da

SharePoint - Hide items in 'Site Actions' menu


I would like to hide a number of items currently listed in the 'Site Actions' menu of a publishing site I've created.

I've deployed a feature that adds a link to the 'Site Actions' menu that links to a custom application.

In this feature would I be able to also specify which 'Site Actions' items to hide?

hide context menu of a document library such as Alert me and Send to

How to hide Alert me and Send to of the context menu of  a document library.I do not wat to do it VIA core.js.
is there any other way to do it.


Hide public view of list on left menu - no SD - Sharepoint 2003


Hi folks,

I'm working in a crippled sharepoint environment - basically our multinational company has given us a Sharepoint with a Teamsite template and no tools to get the best out of it.

I have created a site with a list containing 3 public views. 2 of these views are for the "the workers" to input and view data. The 3rd view has all items, and is for management information for a select number of users. These users do not use the view directly, it is picked up by an Excel spreadsheet.

The 3rd view in it's completeness is sensitive information, and we would like to remove the view from the views menu on the left hand side. I suspect that this may be possible using javascript code, in a CEWP. I am making this assumption because this article seems to be doing something similar:


I am not familiar with javascript or the objects referred to, although I have used javascript previously to amend column widths in a view. 

Any suggestions?




How to hide/remove "Alert Me" action menu item from Custom List/Document Library?


Hi All,


I am using Sharepoint 2007 (MOSS).

I want to hide/remove "Alert Me" action menu item from Custom List/Document Library for my Sharepoint site.


any help will be appreciated.



how can i programmically hide menu items in c#




I have used the asp.net menu control to add in a menu to my website.

It has a sitemap attached to it.

I want to hide some of the menu items when certain users are logged in.

I have seen a way to do this via the site-map security trimming feature in the web.config file.

However, I want to know if there is an alternative way to do this using C#.


Does anyone have any suggestions as to how I can go about this.



How to hide nodes in Menu control?


I have the following Menu control:

<asp:Menu ID="NavigationMenu" runat="server" CssClass="menu" 
                    EnableViewState="false" IncludeStyleBlock="false" Orientation="Horizontal" 
<asp:SiteMapDataSource ID="smdsMyMenu" runat="server" ShowStartingNode="false" SiteMapProvider="pebMySiteMapProvider"/>

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

Hide New,Actions & Settings menu in AlI Item.aspx



how can i Hide New,Actions & Settings menu in allItems.aspx (without write any code)?

although my list have Contribute permission I want to hide New Menu in AllItems.aspx. because i want to direct user to NewItem page from another link. how can i do that?

I'm very appriciated if anyone help me.


Can i Hide Site action menu for a person who is existing in owner group?



I have requirement like hide the site action menu for a person who is existing in owner gruop.

Here the probem is with out any code just use out of box or designer.

Appreciate help..



ASP.NET Menu with jQuery Superfish

Choosing the right type of menu for a website is not easy at all. The ASP.NET Menu Control is definitely NOT a good starting point due to the horrendous markup it renders, nor is it good for SEO because of the Markup/Content ratio, neither can it be easily styled.

Hide a repeater in ASP.NET C# if the DataSource contains no items?

I have an ASP.NET page that uses a repeater nested within another repeater to generate a listing of data. It's to the effect of the following:
In the (C#) code-behind I'm basically using LINQ to pull a listing of information from an XML document and bind that information to the first repeater.

Searching for the answer to this, it seems the method is to determine whether the data for the nested repeater is empty. If it is, then you set the visibility of the repeater to false.

Problem making Role based Menu in MVC application



 I want to make Rolebase menu in MVC such that if user doesnot have permission for some action then that Action name shouldnot be shown in the Menu.

 I have used the code in the url(http://forums.asp.net/t/1566328.aspx) in my MVC application.My application is a Discussion Forum(in MVC) same functionality as in this forum forums.asp.net

 I have used Controllers for post, thread etc.In each controller there are some actions that are using [Authorize(Roles)] attribute

 but this coding does not count  those Actions in Controllers having Authorize attribute according to the url http://forums.asp.net/t/1566328.aspx 

 In the code, Authorize attribute is applied to Controller class, but my requirement is of Applying Authorize attribute to some actions in controller so that some are available for all users and  some links are available rolewise.Now what is the solution for that?



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend