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: 10/10/2006 4:04:42 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 5 Views: 120 Favorited: 0 Favorite
6 Items, 1 Pages 1 |< << Go >> >|
bhavin78
Asp.Net User
MenuControl - SiteMapDataSource10/10/2006 4:04:42 PM

0

I have a menu control with sitemapdatasource. How can I control target of the each link in menu control. I want only one of the link to open in new page rest on the same page.
mnorby
Asp.Net User
Re: MenuControl - SiteMapDataSource10/27/2006 5:21:58 PM

0

Try this;

<siteMapNode title="&lt;a href=&quot;http://forums.asp.net/thread/1423985.aspx&quot;

target=&quot;_blank&quot;&gt;Your Post&lt;/a&gt;" />

Matt

bhavin78
Asp.Net User
Re: MenuControl - SiteMapDataSource10/27/2006 10:07:58 PM

0

    <siteMapNode title="<a href='http://forums.asp.net/thread/1423985.aspx' target='_blank'>Your Post</a>" />

<siteMapNode title="<a href='http://forums.asp.net/thread/1423985.aspx' target='_blank'>Your Post</a>" />

Error at <a Invalid child element a in namespace

mnorby
Asp.Net User
Re: MenuControl - SiteMapDataSource10/27/2006 11:56:05 PM

0

Did you try it as posted above.  That is how I added javascript onmouseover events to my menu.

Try using the named entity: < is equal to &lt;

 <siteMapNode title="<a href='http://forums.asp.net/thread/1423985.aspx' target='_blank'>Your Post</a>" />

to

<siteMapNode title="&lt;a href=&quot;http://forums.asp.net/thread/1423985.aspx&quot; target=&quot;_blank&quot;&gt;Your Post&lt;/a&gt;" />

I tried this in VS 2005 and it works. 

Good Reference.

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/charsets/charsets.asp 

Matt

bhavin78
Asp.Net User
Re: MenuControl - SiteMapDataSource10/30/2006 11:30:56 AM

0

I got that to work but the way it's displayed (fonts/ color/ alignment)etc is different than other siteMapNode because we used HTTP.
Dave Sussman
Asp.Net User
Re: MenuControl - SiteMapDataSource10/31/2006 4:00:42 PM

0

I have to say that even though this works, it's not a great solution. You're using the system in a way in which it's not designed. The siteMapNode supports the notion of custom attributes, so you can add a target attribute. The Menu control however, doesn't automatically bind to this attribute, but it's pretty easy to add some code to do this. Just hook into the MenuItemDataBound event for the menu control:

    protected void menu1_MenuItemDataBound(object sender, MenuEventArgs e)
    {
        // if the siteMapNode has a "target" attribute, use the
        // value as the Target of the menu item
        SiteMapNode node = e.Item.DataItem as SiteMapNode;

        if (!string.IsNullOrEmpty(node["target"]))
            e.Item.Target = node["target"];
    }

Dave

 

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


Free Download:

Books:
Professional Asp.Net 2.0 Design: Css, Themes, And Master Pages Authors: Jacob J. Sanford, Pages: 504, Published: 2007
Professional Asp.Net 2.0, Special Edition Authors: Bill Evjen, Farhan Muha, Pages: 1586, Published: 2006
Beginning Asp. Net 2.0 & Databases Authors: Thiru Thangarathinam, Pages: 404, Published: 2005
Beginning ASP.NET 2.0 Authors: Chris Hart, John Kauffman, Chris Ullman, David Sussman, Pages: 759, Published: 2005
Professional ASP.NET 2.0 Authors: Bill Evjen, Scott Hanselman, Farhan Muhammad, Srinivasa Sivakumar, Devin Rader, Pages: 1253, Published: 2005

Web:
Menu Control - ASP.NET QuickStart Tutorials There are two samples in this page that each use a Menu control associated with a SiteMapDataSource control on the page by setting the Menu DataSourceID ...
Using menu control with sitemapdatasource Talk about Using menu control with sitemapdatasource.
Menu Control. SiteMapDataSource, or XmlDataSource - ASP.NET Forums Using an XmlDataSource rather than a SiteMapDataSource. Is this a clean way of doing things? Has anyone got a better suggestion as to how to ...
CodeProject: Populating Menu Control in ASP.NET 2.0 - using ... Oct 7, 2005 ... This is the preferred way of populating the Menu control. SiteMapDataSource allows you to read the information from the .sitemap file which ...
ASP.NET 2.0: Using the Menu Control Each Menu Control needs a SiteMapDataSource. If none is specified, the default XmlSiteMapProvider is used, and it requires a "web. ...

MenuControl - SiteMapDataSource - ng.asp-net-forum ... MenuControl - SiteMapDataSource, > ROOT > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls, Date: 10/10/2006 4: 04:42 ...
how can i trigger menucontrol with updatepanel?? - ng.asp-net ... The Menu control is used in combination with a SiteMapDataSource control for navigating a Web site. But, according the code that you provided, ...
Menu control not displaying StaticSelectedStyle css style - ng.asp ... Menu control not displaying StaticSelectedStyle css style, > ROOT > NEWSGROUP > Asp.Net ... Hide my first parent level in Navigation Menu - ng.asp-net-forum ... if you are binding your control with sitemapdatasource then you have to modify the .... You should place the code in the menu control's databound event, ...
Set active link in menu - ng.asp-net-forum ... By using a SiteMapDataSource together with the Menu control, the Menu will automatically be added with nodes after the structure of the web.sitemap file. ...












how to avoid reloading of navigation menu every time

problem of tree control when used with model dialog window

treeview in master.page and content.pages

referencing a content page from the master

securitytrimming and sitemappath

how can i use image in menu control?

treeview - preserve extended nodes between pages

adding a simple menu by linking it to an access database

dynamically change skin of user control

dynamic breadcrumbs

gridview with contentpage problem when updating

how do you control the menu control?

asp.net master page javascript

accesskey for menuitem?

how can i trick the sitemappath?

logincontrol contents coming in reverse order in master page

masterpages - global - viewing design mode

different colours in navigation menu

how to create menu& submenus in webform using vb.net

treeview postback + populatenode

menu item not selecting

setting background color of .selecteditem.parent when a dynamic menuitem is selected?

master page with two menus, content place holder, sitemap and dynamic controls

masterpage problem.image in masterpage not shows in childpages

nested master pages and htmllink

event selectednodechanged of the treeview

it work on regular webpage but not webpage with masterpage...

hide "home" link in the menu

submenu hoverstyle

treeview right click problem

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT