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.externa l.AddFavorite(l ocation.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 2 2993
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**********@c om.msn_swap_msn _and_comwrote in message
news:eA******** ******@TK2MSFTN GP04.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.externa l.AddFavorite(l ocation.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
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**********@c om.msn_swap_msn _and_comwrote in message
news:eA******** ******@TK2MSFTN GP04.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="javascrip t:window.extern al.AddFavorite( location.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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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
|
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 connection, and is returning the
correct roles, but...
When we specify a role on the top sitemapnode that role seems to add to
the roles on lower level nodes, so we end up needing to put roles="*"
on the top node, but then regardless of which role we put...
|
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>
<sitemapnode site="City1">
<sitemapnode name="home" ... />
***other menu items here***
</sitemapnode>
<sitemapnode site="City2">
|
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 get an error in Flash when it trys to open this file using standard Flash
commands. However when I change the file name and command to 'Web.xml'
it works. (it also works if I don't change the name, but run the swf in
flash player and not via the...
|
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 and somehowI am getting an error:
| |
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 .ashx Asp.Net file that when the .ashx file is
|
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 simply persist any changes i made, but it
doesn't happen.
e.g. selected.ParentNode.ChildNodes.Remove(selected);
throws a NotSupportedException "Collection is read-only"
|
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 redirects to a page with a menu control associated to a
SiteMapDataSource.
I want to hide pg1 for all non-members of role manager (=user2).
|
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>
<loc>http://localhost/index.php/index.php/Games/The-edge-of-the-
wall</loc>
|
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...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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,...
|
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...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |