473,473 Members | 2,151 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

web.sitemap and javascript url

Hi,

I use a web.sitemap file to create a dynamic menu in my web application.
I want to add an entry that does not navigate but add the page to the user's
favorites.

I added a node like this :

<siteMapNode title="Ajouter cette page aux favoris"
url="javascript:window.external.AddFavorite(locati on.href, document.title)"
/>
It works fine when rendering the client, however the page that hosts the
menu control generate an error at design time since the node url is not a
relative node.
If I remove the javascript: there is not error in the designer, but at run
time the url is http://myserver/myapp/window.external.AddFavorite(...) which
is not valide.

How can I correctly set the sitemap to avoid both design time and runtime
error ?
Thanks,
Steve
Nov 28 '06 #1
2 2979
It is very hard to maintain design-time functionality on the same level as
run-time one. At some stage you will give up and won't care of design-time
errors any more.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Steve B." <st**********@com.msn_swap_msn_and_comwrote in message
news:eA**************@TK2MSFTNGP04.phx.gbl...
Hi,

I use a web.sitemap file to create a dynamic menu in my web application.
I want to add an entry that does not navigate but add the page to the
user's favorites.

I added a node like this :

<siteMapNode title="Ajouter cette page aux favoris"
url="javascript:window.external.AddFavorite(locati on.href,
document.title)" />
It works fine when rendering the client, however the page that hosts the
menu control generate an error at design time since the node url is not a
relative node.
If I remove the javascript: there is not error in the designer, but at run
time the url is http://myserver/myapp/window.external.AddFavorite(...)
which is not valide.

How can I correctly set the sitemap to avoid both design time and runtime
error ?
Thanks,
Steve

Nov 28 '06 #2
I do, but later when an "real" designer will take the project, I'll have to
explain him how to disable this node while designing and enable it while
testing... which can be quite a pain for a non coder...

Steve
"Eliyahu Goldin" <RE**************************@mMvVpPsS.orga écrit dans le
message de news: Ow**************@TK2MSFTNGP02.phx.gbl...
It is very hard to maintain design-time functionality on the same level as
run-time one. At some stage you will give up and won't care of design-time
errors any more.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Steve B." <st**********@com.msn_swap_msn_and_comwrote in message
news:eA**************@TK2MSFTNGP04.phx.gbl...
>Hi,

I use a web.sitemap file to create a dynamic menu in my web application.
I want to add an entry that does not navigate but add the page to the
user's favorites.

I added a node like this :

<siteMapNode title="Ajouter cette page aux favoris"
url="javascript:window.external.AddFavorite(locat ion.href,
document.title)" />
It works fine when rendering the client, however the page that hosts the
menu control generate an error at design time since the node url is not a
relative node.
If I remove the javascript: there is not error in the designer, but at
run time the url is
http://myserver/myapp/window.external.AddFavorite(...) which is not
valide.

How can I correctly set the sitemap to avoid both design time and runtime
error ?
Thanks,
Steve


Nov 28 '06 #3

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

Similar topics

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...
1
by: chris.rust | last post by:
Has anyone else had any trouble setting up a sitemap view to be filtered by roles? We've put a cust role provider in place, and we can verify that it's only being called once for each...
1
by: mike | last post by:
I have 2 sites in my company. My .NET site uses a master page and a Menu control connected to a sitemap. In my sitemap file I would like to be able to do something like this: <sitemap>...
5
by: JJ | last post by:
Although this question involves Flash, I suspect the actual issue is an asp one.. I am trying to open the web.sitemap file in an .swf file enbedded in an asp page (I'm working in VS 2005). I...
4
by: shapper | last post by:
Hello, I have 2 questions about Asp.Net 2.0 web.sitemap: 1. Where can I find the list of all siteMapNode attributes? I looked eveywhere and couldn't find it. 2. I created a Web.sitemap...
4
by: shapper | last post by:
Hello, I am trying to convert an Asp.Net 2.0 XML sitemap file to a Google's sitemap file. I am posting the formats of both files. 1. How can I do the conversion? 2. And can I use an...
5
by: Tim Mackey | last post by:
hi, i have put my web.sitemap in /App_Data so i can edit it programatically via a web admin page, inheriting the modify permissions from the App_Data folder etc. i was hoping the provider would...
0
by: Chris | last post by:
Hi, i have a problem with the visibility of my sitemap. There is one role defined: "manager" There are two users: 'user1' (member of role manager) and 'user2' (not member). The login.aspx...
6
by: Olagato | last post by:
I need to transform this: <urlset xmlns="http://www.google.com/schemas/sitemap/0.84"> <url> <loc>http://localhost/index.php/index./Paths-for-the-extreme-player</ loc> </url> <url>...
0
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,...
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...
1
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...
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,...
1
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...
0
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...
0
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...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.