CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 2/9/2007 11:13:55 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 4 Views: 132 Favorited: 0 Favorite
5 Items, 1 Pages 1 |< << Go >> >|
AnthonySteele
Asp.Net User
Menu make the selected item not clickable-2/9/2007 11:13:55 AM

0

I have a menu object bound to the sitemap xml file. I've set all the options so that it displays a bar of links across the top (one level at present, no drop down menu items) I have set the css classes so that the selected menu item is displayed differently from the others. Only one thing remains: I want to take away the hyperlink from the selected item, like setting the SiteMapPath's RenderCurrentNodeAsLink property to false. I don't see any obvious way to do this. How would I go about it?
tfsmag
Asp.Net User
Re: Menu make the selected item not clickable-2/9/2007 2:08:51 PM

0

if you're using the menu control you can do something like this in the menuitemdatabound event

    Protected Sub Menu1_MenuItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemDataBound
         If e.Item.Selected = True Then
            e.Item.Selectable = False
        End If
    End Sub


------------------------------------------------
Jeff Turner (simpleModus)

Don't forget to mark the correct answer for your
question to help out future visitors!
AnthonySteele
Asp.Net User
Re: Menu make the selected item not clickable-2/9/2007 8:10:09 PM

0

That works perfectly, thanks!

    protected void MainMenu_MenuItemDataBound(object sender, MenuEventArgs e)
    {
        if (e.Item.Selected)
            e.Item.Selectable = false;
    }

AnthonySteele
Asp.Net User
Re: Menu make the selected item not clickable-2/9/2007 8:11:56 PM

0

....except that now when I do a postback on a page, I get a popup: "can't select a disabled or unelectable menu item."
AnthonySteele
Asp.Net User
Re: Menu make the selected item not clickable-2/12/2007 10:29:20 PM

-1

For reference, here is a solution that seems to work better:

 

    protected void MainMenu_MenuItemDataBound(object sender, MenuEventArgs e)
    {
        if (e.Item.Selected)
        {
            e.Item.Selected = false;
            e.Item.Selectable = false;
        }
    }

5 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
The essential guide to user interface design: an introduction to GUI design principles and techniques Authors: Wilbert O. Galitz, Pages: 857, Published: 2007
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages Authors: Jacob J. Sanford, Pages: 474, Published: 2007
The Photo shop 7 wow! book Authors: Jack Davis, Linnea Dayton, Pages: 471, Published: 2003
Computational linguistics and intelligent text processing: 4th international conference, CICLing 2003, Mexico City, Mexico, February 16-22, 2003 : proceedings Authors: Alexander Gelbukh, Pages: 648, Published: 2003

Web:
Menu make the selected item not clickable- - ASP.NET Forums I have a menu object bound to the sitemap xml file. I've set all the options so that it displays a bar of links across the top (one level at ...
Make the whole table cell a clickable item | drupal.org My jquery fu is not strong enough to know which jQuery is better, ... is no longer checked, but the 'all' checkbox is still selected. ...
Joomla! • View topic - make links non clickable Then I selected the item in the menu that I want non clickable. I then selected "change type" but I do not see a "placeholder" option? ...
World of Warcraft - English (NA) Forums -> Dropdown menu code ... By "selected" do you mean you want a check to appear next to the selected item's name ? Or are the items just not clickable at all? .... My example was from one of the "let's make it a bit more elegant" revisions. ...
Sub Menu Links - Mambo - Forums Closed for posting --Sub Menu Item Blue Widgets (Clickable to Blue Widgets) ... is called in this example Products (and since it's a menu is not clickable) ... allowing me to add a NEW Menu Item, I selected content item as the type, ... go back through your sections and categories and make sure it's all deleted, ...

ASP:Menu - Make Entire sub-menu item clickable? - ng.asp-net-forum ... Menu make the selected item not clickable- - ASP.NET Forums I have a menu object bound to the sitemap xml file. I've set all the options so that it displays ...
Change SiteMapPath based on User login - ng.asp-net-forum ... the file web.sitemap required by xmlsitemapprovider does not exist · menu make the selected item not clickable- · callback in contentplaceholder ...






how to throw multiple lines message when throw exception?

really just getting started!

pdf creation using gios pdf library

how to run a console application using asp.net

linking into datagrid details

mailmessage versus smtpmail

serialization

speed issues

messagebox

hide label which is inside a repeater control

forcing a script to sleep for x milliseconds

personal web server

registerstartupscript and postback

convert hours, minutes, seconds to hours only

click event of an user web control

conversion of binary to hexstring base16

issues when inheriting members from a base class

why can't code behind file 'see' control

object reference not set to an instance of an object again!

local vs remote login

message box

learning asp.net, reading material

master pages?

embedding .net component in html

how to creat table as excel table

global objectdatasource definition

raise event

how to convert string to int

mail

how to join two tables from a dataset

   
  Privacy | Contact Us
All Times Are GMT