473,413 Members | 1,718 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

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 11940
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.Target = "_blank"; // or any other target

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

protected void MyTreeView_TreeNodeDataBound(object sender, TreeNodeEventArgs e)
{
if( e.Node.NavigateUrl == "[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*********************@i42g2000cwa.googlegro ups.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="Lakeridge - Home Page" description=""
url="LakeridgeWater.aspx">
<siteMapNode title="Articles of Incorporation" description=""
url="Articles.aspx" />
<siteMapNode title="Minutes for 2006" description="" >
<siteMapNode title="September 2006" description=""
url="minutes0912.pdf" target="_blank"/>
<siteMapNode title="August 2006" description=""
url="minutes0806.pdf" target="_blank" />
<siteMapNode title="July 20, 2006" description=""
url="minutes0720.pdf" target="_blank"/>
<siteMapNode title="July 11, 2006" description=""
url="minutes0711.pdf" target="_blank"/>
</siteMapNode>
<siteMapNode title="Bylaws" description="" url="bylaws.aspx" />
<siteMapNode title="Plot Map" description="" url="plotmap.aspx" />
</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_TreeNodeDataBound(ByVal sender As Object,
ByVal e As TreeNodeEventArgs)
If e.Node.NavigateUrl = "[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.Target = "_blank"; // or any other target

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

protected void MyTreeView_TreeNodeDataBound(object sender, TreeNodeEventArgs e)
{
if( e.Node.NavigateUrl == "[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*********************@i42g2000cwa.googlegro ups.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_TreeNodeDataBound(ByVal sender As Object, _
ByVal e As System.Web.UI.WebControls.TreeNodeEventArgs) _
Handles TreeView1.TreeNodeDataBound

If e.Node.NavigateUrl.EndsWith("pdf") 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="Lakeridge - Home Page" description=""
url="LakeridgeWater.aspx">
<siteMapNode title="Articles of Incorporation" description=""
url="Articles.aspx" />
<siteMapNode title="Minutes for 2006" description="" >
<siteMapNode title="September 2006" description=""
url="minutes0912.pdf" target="_blank"/>
<siteMapNode title="August 2006" description=""
url="minutes0806.pdf" target="_blank" />
<siteMapNode title="July 20, 2006" description=""
url="minutes0720.pdf" target="_blank"/>
<siteMapNode title="July 11, 2006" description=""
url="minutes0711.pdf" target="_blank"/>
</siteMapNode>
<siteMapNode title="Bylaws" description="" url="bylaws.aspx" />
<siteMapNode title="Plot Map" description="" url="plotmap.aspx" />
</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_TreeNodeDataBound(ByVal sender As Object,
ByVal e As TreeNodeEventArgs)
If e.Node.NavigateUrl = "[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.Target = "_blank"; // or any other target

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

protected void MyTreeView_TreeNodeDataBound(object sender, TreeNodeEventArgs e)
{
if( e.Node.NavigateUrl == "[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*********************@i42g2000cwa.googlegro ups.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.googlegro ups.com...
I got it to work.

Thanks for your help. This is how it ended up looking.
Protected Sub MyTreeView_TreeNodeDataBound(ByVal sender As Object, _
ByVal e As System.Web.UI.WebControls.TreeNodeEventArgs) _
Handles TreeView1.TreeNodeDataBound

If e.Node.NavigateUrl.EndsWith("pdf") 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="Lakeridge - Home Page" description=""
url="LakeridgeWater.aspx">
<siteMapNode title="Articles of Incorporation" description=""
url="Articles.aspx" />
<siteMapNode title="Minutes for 2006" description="" >
<siteMapNode title="September 2006" description=""
url="minutes0912.pdf" target="_blank"/>
<siteMapNode title="August 2006" description=""
url="minutes0806.pdf" target="_blank" />
<siteMapNode title="July 20, 2006" description=""
url="minutes0720.pdf" target="_blank"/>
<siteMapNode title="July 11, 2006" description=""
url="minutes0711.pdf" target="_blank"/>
</siteMapNode>
<siteMapNode title="Bylaws" description="" url="bylaws.aspx" />
<siteMapNode title="Plot Map" description="" url="plotmap.aspx" />
</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_TreeNodeDataBound(ByVal sender As Object,
ByVal e As TreeNodeEventArgs)
If e.Node.NavigateUrl = "[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.Target = "_blank"; // or any other target

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

protected void MyTreeView_TreeNodeDataBound(object sender, TreeNodeEventArgs e)
{
if( e.Node.NavigateUrl == "[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*********************@i42g2000cwa.googlegro ups.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
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...
1
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...
5
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...
1
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
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">...
2
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...
6
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...
0
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...
0
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.