473,770 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Wheres the Target for siteMapNode?

I can't beleive that Microsoft would create the whole Sitemap XML
datasource process but not have a TARGET tag. What am I missing? The
only place I saw the target tag was at the treeview level. Please tell
me that something this basic is at the siteMapNode level and not the
Treeview level?

Does anyone have a work around for this Design Flaw?

Oct 14 '06 #1
4 11957
re:
What am I missing? The only place I saw the target tag was at the treeview level.
Robert Haken, MVP, provided this answer...

---000---

For all TreeView nodes, you can set

MyTreeView.Targ et = "_blank"; // or any other target

for only some of them, you can use the TreeNodeDataBou nd event:

protected void MyTreeView_Tree NodeDataBound(o bject sender, TreeNodeEventAr gs e)
{
if( e.Node.Navigate Url == "[url]" ) // get only this one item
e.Node.Target = "_blank"; // or any other target
}

---000---

re:
Does anyone have a work around for this Design Flaw?
Why do you consider that a "design flaw" ?

Which functionality do you think is missing ?


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
<ne*****@lni.wa .govwrote in message news:11******** *************@i 42g2000cwa.goog legroups.com...
>I can't beleive that Microsoft would create the whole Sitemap XML
datasource process but not have a TARGET tag. What am I missing? The
only place I saw the target tag was at the treeview level. Please tell
me that something this basic is at the siteMapNode level and not the
Treeview level?

Does anyone have a work around for this Design Flaw?

Oct 14 '06 #2
Thank you for your time in responding to my query.
Here is an example how I figured it would work ... Note the "Target"
tag's on the url's that are PDF's
<siteMapNode title="Lakeridg e - Home Page" description=""
url="LakeridgeW ater.aspx">
<siteMapNode title="Articles of Incorporation" description=""
url="Articles.a spx" />
<siteMapNode title="Minutes for 2006" description="" >
<siteMapNode title="Septembe r 2006" description=""
url="minutes091 2.pdf" target="_blank"/>
<siteMapNode title="August 2006" description=""
url="minutes080 6.pdf" target="_blank" />
<siteMapNode title="July 20, 2006" description=""
url="minutes072 0.pdf" target="_blank"/>
<siteMapNode title="July 11, 2006" description=""
url="minutes071 1.pdf" target="_blank"/>
</siteMapNode>
<siteMapNode title="Bylaws" description="" url="bylaws.asp x" />
<siteMapNode title="Plot Map" description="" url="plotmap.as px" />
</siteMapNode>
</siteMap>
I do not want it at the Treeview level. That means that all the
sitemapnodes will open up in a new window. I need to be able to pick
and choose what the target is.

I have some documents that are PDF documents, I need to open them up in
a new window so I do not loose the navagation.

I tried your sample code on my master page (I use vb not c#, sorry).
If I could get this to work, then I could set the e.Node.Target =
"_blank" if the url ends with "PDF". But, I could not get it to work.
It looks like you can overide the sitemap at databound time, but it
did not execute.

Protected Sub MyTreeView_Tree NodeDataBound(B yVal sender As Object,
ByVal e As TreeNodeEventAr gs)
If e.Node.Navigate Url = "[url]" Then
e.Node.Target = "_blank"
End If
End Sub
I put a breakpoint here but it did not stop on this subroutine. I put
this on the masterpage, is there somewhere else to put it?

Juan T. Llibre wrote:
re:
What am I missing? The only place I saw the target tag was at the treeview level.

Robert Haken, MVP, provided this answer...

---000---

For all TreeView nodes, you can set

MyTreeView.Targ et = "_blank"; // or any other target

for only some of them, you can use the TreeNodeDataBou nd event:

protected void MyTreeView_Tree NodeDataBound(o bject sender, TreeNodeEventAr gs e)
{
if( e.Node.Navigate Url == "[url]" ) // get only this one item
e.Node.Target = "_blank"; // or any other target
}

---000---

re:
Does anyone have a work around for this Design Flaw?

Why do you consider that a "design flaw" ?

Which functionality do you think is missing ?


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
<ne*****@lni.wa .govwrote in message news:11******** *************@i 42g2000cwa.goog legroups.com...
I can't beleive that Microsoft would create the whole Sitemap XML
datasource process but not have a TARGET tag. What am I missing? The
only place I saw the target tag was at the treeview level. Please tell
me that something this basic is at the siteMapNode level and not the
Treeview level?

Does anyone have a work around for this Design Flaw?
Oct 14 '06 #3
I got it to work.

Thanks for your help. This is how it ended up looking.
Protected Sub MyTreeView_Tree NodeDataBound(B yVal sender As Object, _
ByVal e As System.Web.UI.W ebControls.Tree NodeEventArgs) _
Handles TreeView1.TreeN odeDataBound

If e.Node.Navigate Url.EndsWith("p df") Then
e.Node.Target = "_blank"
End If
End Sub

ne*****@lni.wa. gov wrote:
Thank you for your time in responding to my query.
Here is an example how I figured it would work ... Note the "Target"
tag's on the url's that are PDF's
<siteMapNode title="Lakeridg e - Home Page" description=""
url="LakeridgeW ater.aspx">
<siteMapNode title="Articles of Incorporation" description=""
url="Articles.a spx" />
<siteMapNode title="Minutes for 2006" description="" >
<siteMapNode title="Septembe r 2006" description=""
url="minutes091 2.pdf" target="_blank"/>
<siteMapNode title="August 2006" description=""
url="minutes080 6.pdf" target="_blank" />
<siteMapNode title="July 20, 2006" description=""
url="minutes072 0.pdf" target="_blank"/>
<siteMapNode title="July 11, 2006" description=""
url="minutes071 1.pdf" target="_blank"/>
</siteMapNode>
<siteMapNode title="Bylaws" description="" url="bylaws.asp x" />
<siteMapNode title="Plot Map" description="" url="plotmap.as px" />
</siteMapNode>
</siteMap>
I do not want it at the Treeview level. That means that all the
sitemapnodes will open up in a new window. I need to be able to pick
and choose what the target is.

I have some documents that are PDF documents, I need to open them up in
a new window so I do not loose the navagation.

I tried your sample code on my master page (I use vb not c#, sorry).
If I could get this to work, then I could set the e.Node.Target =
"_blank" if the url ends with "PDF". But, I could not get it to work.
It looks like you can overide the sitemap at databound time, but it
did not execute.

Protected Sub MyTreeView_Tree NodeDataBound(B yVal sender As Object,
ByVal e As TreeNodeEventAr gs)
If e.Node.Navigate Url = "[url]" Then
e.Node.Target = "_blank"
End If
End Sub
I put a breakpoint here but it did not stop on this subroutine. I put
this on the masterpage, is there somewhere else to put it?

Juan T. Llibre wrote:
re:
What am I missing? The only place I saw the target tag was at the treeview level.
Robert Haken, MVP, provided this answer...

---000---

For all TreeView nodes, you can set

MyTreeView.Targ et = "_blank"; // or any other target

for only some of them, you can use the TreeNodeDataBou nd event:

protected void MyTreeView_Tree NodeDataBound(o bject sender, TreeNodeEventAr gs e)
{
if( e.Node.Navigate Url == "[url]" ) // get only this one item
e.Node.Target = "_blank"; // or any other target
}

---000---

re:
Does anyone have a work around for this Design Flaw?
Why do you consider that a "design flaw" ?

Which functionality do you think is missing ?


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
<ne*****@lni.wa .govwrote in message news:11******** *************@i 42g2000cwa.goog legroups.com...
>I can't beleive that Microsoft would create the whole Sitemap XML
datasource process but not have a TARGET tag. What am I missing? The
only place I saw the target tag was at the treeview level. Please tell
me that something this basic is at the siteMapNode level and not the
Treeview level?
>
Does anyone have a work around for this Design Flaw?
>
Oct 14 '06 #4
Great!

Congratulations ...
Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
<ne*****@lni.wa .govwrote in message news:11******** **************@ m7g2000cwm.goog legroups.com...
I got it to work.

Thanks for your help. This is how it ended up looking.
Protected Sub MyTreeView_Tree NodeDataBound(B yVal sender As Object, _
ByVal e As System.Web.UI.W ebControls.Tree NodeEventArgs) _
Handles TreeView1.TreeN odeDataBound

If e.Node.Navigate Url.EndsWith("p df") Then
e.Node.Target = "_blank"
End If
End Sub

ne*****@lni.wa. gov wrote:
Thank you for your time in responding to my query.
Here is an example how I figured it would work ... Note the "Target"
tag's on the url's that are PDF's
<siteMapNode title="Lakeridg e - Home Page" description=""
url="LakeridgeW ater.aspx">
<siteMapNode title="Articles of Incorporation" description=""
url="Articles.a spx" />
<siteMapNode title="Minutes for 2006" description="" >
<siteMapNode title="Septembe r 2006" description=""
url="minutes091 2.pdf" target="_blank"/>
<siteMapNode title="August 2006" description=""
url="minutes080 6.pdf" target="_blank" />
<siteMapNode title="July 20, 2006" description=""
url="minutes072 0.pdf" target="_blank"/>
<siteMapNode title="July 11, 2006" description=""
url="minutes071 1.pdf" target="_blank"/>
</siteMapNode>
<siteMapNode title="Bylaws" description="" url="bylaws.asp x" />
<siteMapNode title="Plot Map" description="" url="plotmap.as px" />
</siteMapNode>
</siteMap>
I do not want it at the Treeview level. That means that all the
sitemapnodes will open up in a new window. I need to be able to pick
and choose what the target is.

I have some documents that are PDF documents, I need to open them up in
a new window so I do not loose the navagation.

I tried your sample code on my master page (I use vb not c#, sorry).
If I could get this to work, then I could set the e.Node.Target =
"_blank" if the url ends with "PDF". But, I could not get it to work.
It looks like you can overide the sitemap at databound time, but it
did not execute.

Protected Sub MyTreeView_Tree NodeDataBound(B yVal sender As Object,
ByVal e As TreeNodeEventAr gs)
If e.Node.Navigate Url = "[url]" Then
e.Node.Target = "_blank"
End If
End Sub
I put a breakpoint here but it did not stop on this subroutine. I put
this on the masterpage, is there somewhere else to put it?

Juan T. Llibre wrote:
re:
What am I missing? The only place I saw the target tag was at the treeview level.
Robert Haken, MVP, provided this answer...

---000---

For all TreeView nodes, you can set

MyTreeView.Targ et = "_blank"; // or any other target

for only some of them, you can use the TreeNodeDataBou nd event:

protected void MyTreeView_Tree NodeDataBound(o bject sender, TreeNodeEventAr gs e)
{
if( e.Node.Navigate Url == "[url]" ) // get only this one item
e.Node.Target = "_blank"; // or any other target
}

---000---

re:
Does anyone have a work around for this Design Flaw?
Why do you consider that a "design flaw" ?

Which functionality do you think is missing ?


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
<ne*****@lni.wa .govwrote in message
news:11******** *************@i 42g2000cwa.goog legroups.com...
>I can't beleive that Microsoft would create the whole Sitemap XML
datasource process but not have a TARGET tag. What am I missing? The
only place I saw the target tag was at the treeview level. Please tell
me that something this basic is at the siteMapNode level and not the
Treeview level?
>
Does anyone have a work around for this Design Flaw?
>

Oct 14 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1924
by: Nate Hekman | last post by:
The documentation for the SiteMapNode class refers to a public property named Item, which is supposed to get a custom attribute from the Attributes collection. But when I include this line in my aspx: <%= SiteMap.CurrentNode.Item %> I get this compiler error: CS0117: 'System.Web.SiteMapNode' does not contain a definition for 'Item'
1
6930
by: Joe | last post by:
I have a web.sitemap file that has the url title and description. I then have this attac attached to a menu. I want some of my menu choices to open up in a page in a new window ie _blank as target. How do I do this with a web.sitemap file
5
3989
by: Jon via DotNetMonster.com | last post by:
<siteMapNode title="share price" description="Link to Netcall on the London Stock Exchange" url="http://www.yahoo.co.uk" role="" target="_blank" /> Hi all I'm trying to open the Yahoo web site in a new window using the above code in my asp.net web.sitemap. I'm expecting the target="_blank" bit to make it do this. but it isnt. Does anyone know why?? Thanks in advance.
1
1256
by: Leo | last post by:
I am trying to create a siteMapNode: <siteMapNode title="Finance & Admin" However, it doesn't like the "&" in the string. Do I have to use some escape sequence to make it work?
0
1080
by: David | last post by:
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="" title="Menu" description="" roles="*"> <siteMapNode url="~/" title="Home" description="Home"> <siteMapNode url="~/Home.aspx" title="Home" description="Home" /> <siteMapNode url="Todo.aspx" title="To Do" description="To Do" /> <siteMapNode url="http://www.google.com" title="Blah" /> The Home and Todo nodes render in the menu, why doesn't google
2
1439
by: Stephen | last post by:
Hi Using: Visual Web Developer Express 2005 Could someone explain to me what the "node" does in a path - such as; <siteMapNode title="Hardware" url="Default.aspx?node=hardware"> Has it got something to do with PostBack?
6
18669
by: Max2006 | last post by:
Hi, I need to hide a series of siteMapNodes to certain roles. That means roles have access to the siteMapNode, but the node doesn't appear on the navigation menu. I'll use Response.Redirect to jump to hidden pages. How can I do that? I tried securityTrimmingEnabled="true" in my web.config. But it doesn't help because the pages are accessible to the roles. I just want to hide the pages from the main menu when certain roles login
0
1080
by: ryanmhuc | last post by:
I would like to create a tab menu navigation where all pages under a directory are considered under a specific tab. So when under any page in a directory its tab is considered selected. I have created a tab menu using asp:menu, used the sitemapnodes, and created a tab navigation that where when on the specified page (SiteMapNode) the tab is selected. I did using the following tutorial http://dotnet.sys-con.com/read/86222.htm Is it...
0
2573
by: AAaron123 | last post by:
Is there a method of making a sitemapnode not visible and still have it's title appear in the bread crumbs? The reason for the invisible sitemapnode is so the page appears in the breadcrumbs (even though the page was accessed otherwise than with a menuitem) I can do it by creating a sitemapnode without a url and placing the sitemapnode that I want invisible under it. That way it appears in the bread crumbs but looks it like a top...
0
9617
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10099
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10037
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9904
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6710
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5354
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.