Web Forms :: Is It Possible To Customize A SiteMapNode
Jan 6, 2011Is it possible to customize a siteMapNode? Like adding space between the menu selections and/or adding icons?
View 1 RepliesIs it possible to customize a siteMapNode? Like adding space between the menu selections and/or adding icons?
View 1 Repliesi created a web.sitemap file where I have listed the following:
[Code]....
I need to set some values before the menu item navigates to the page. I'd like to use the same aspx page for more than one menu item and I'd like to avoid the use of querystrings in my code. However, I realize that it's not possible to set the same url in the web.sitemap file. If I don't specify a url, the menu item created is not click-able.
Does a sitemapnode need to point to a page of the current site? I'm trying to add a node that would take a user to a page on another site, for example:
<siteMapNode title="Help" url="http://www.help.com/help/help.aspx?" image="~/Image/Help.png">
</siteMapNode>
This node does not show-up in my tree view of links, but all the other nodes show. This is the only node that has a url that points to a page outside the current site.
I have Sitemap with Node,
<siteMapNode url="Forms/Test.aspx" title="Test" description="Test" />
I want to assign url to the siteMapNode dynamically depending upon condition eg.
if(id == 1)
<siteMapNode url="Forms/Test1.aspx" title="Test" description="Test" />
if(id == 2)
<siteMapNode url="Forms/Test2.aspx" title="Test" description="Test" />
how can i add siteMapNode in sitmap on runtime
View 1 RepliesI currently have a working menu driven by a sitemap.I would like to change one of the sitemapnode when a user hits one of my pages. How do i achieve this? I just need to change of the url for one of the nodes in the sitemap.
View 1 RepliesI need to add a sitemapnode to my screen when the user opens it without adding an actual sitemapnode to the sitemap file. This node needs to include url, title, and description. Does anyone have code to show how to do this in C#?
View 2 RepliesI have a TreeView, breadcrumb, and Web.sitemap.
I was given some code a while ago which hid certain nodes from the TreeView but allowed them to appear in the breadcrumb.
Here it is:
[Code]....
I later needed do the same thing but, by now, was using C# instead of VB.
I've tried to translate the VB into C# but the code doesn't work. It doesn't report any design time or run time errors; it just doesn't work (the nodes ARE visible in the TreeView.
Here's the C#:
[Code]....
and I've added this:
[Code]....
I am developing an ASP.NET web page with C#. I have a sitemap document but I want to hide certain nodes based on the user's credentials. However, I am having problems with my code removing the actual node. Visual Studio runs the program with no errors. However, the node is still there. Below is the code I have developed for this. The node changes text to "it worked" as I hope written. However, it will not remove itself. I can get the item to be disabled, change enablement, but I need to hide it completely from the viewers view - not the document.
[Code]....
I have a web.sitemap:
When I run it. It displays Home>Basic Reporting... (All is under Home tab)
[Code]....
I want to add another root (like Home tab) So the user can select another tab withough going through the Home tab,When I add this code (above code ie.2): It doesnt work, compilation error:How do I make it work.
[Code]....
I have a site map on my project and I have section which get values from sql database and it changes according to querystring Id value. In my sitemap the title of the page is everytime same. but I want tpo change it at runtime. I am using multiple sitemaps and My sitemap is not the default one. its name is rootSitemap. I tried some code which I got from msdn but it seems doesn't work for me;
[Code]....
Here is my sitemappath code which is situated in my master page;
<asp:SiteMapPath SiteMapProvider="rootSitemap" ID="SiteMapPath1" runat="server"></asp:SiteMapPath>
How can i have a menu control that Manage SiteMapNode from the menu to hide and Just when admin logged to see it.
[Code]....
I am using Session state in my ASP.NET application. The development is done using InProc session state as the option, but now the application is deployed on a Web Farm(Cluster) environment. As a result, InProc session state is not working.
I have changed the session state mode to SQL server so the session state will work in Web Farm environment. But now i am getting a different error because of some of the objects which i have already used with Session.
Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode.
I understand that every object that is stored in Session needs to be serialized. But there are some objects which are not serializble in DOTNET.
Unfortunately i am using one of them, SiteMapNode. I am storing this object in session to re-create the breadcrumb based on the navigation the user has performed. I have to do this because there are mulitiple paths leading to single page in my application.
I have tried to do serialization of this object using XML serializer object, but its throwing an exception:
"System.Web.SiteMapNode cannot be serialized because it does not have a parameterless constructor."
I can't change the code of storing the SiteMapNode in session as it is very complex and written by someone else. I have to store this object in session or some other state form so that i can continue using the same code.
I have an application where I am binding sitemap to a repeater control for showing horizontal tabs and this shows up fine. Now I have to append some dynamic query string parameters (say id and year) to all the sitemap nodes of the sitemap so that when I bind it to a repeater all the tabs will have these query string parameters.here is my sample code
[Code]....
this is my extendedsitemap within app_code class
[Code]....
And when the sitemap is bound to my repeater control the tabs have url like
[Code]....
Now when I try to click on next or previous buttons on any page to navigate, I am not able to access the nextsibling or previoussibling node.....both of them are null. can any one let me know what am I doing wrong here?
I am using multiple sitemaps in my project. they are all registred inside the web.config file.
I have a blog inside my project and I need something below;
Home > Blog > cahngeable_category_name_acordingto_my_value > changable_blog_post_name_according_to_my_value
I have tried the below code but it didn't work. it gives me an error.
[Code]....
I need to have a siteMapeNode for a menu control to only show up during development.
The following node would be in the web.sitemap file.
[Code]....
I can either put this node in my web.sitemap file and remove it in release builds.
Or Add the node in debug builds.
Probably done in PreInit or Page_load events.
I want to open application in seperate browser when click on SiteMapNode.
View 4 Replieshow to disable sitemap link for a perticular user?
i have 2 columns one is UserStatus which is A/P(Approve / Pending)
2nd is POC =Y/N..
i want to check userstatus =A and POC = Y
and the link name (eg..abcd). at runtime only those users use this link whose status is'A' and POC is' Y'..(enabled
link to ths users)I want to disable this link to other users..
I have a site and Web.sitemap file added to the root folder of the site.
I want to create a new page that allows the user to change the title and description of the SiteMapNodes in the Web.sitemap file. I have completed it partially, in the sense, I am able to iterate through the nodes in the sitemap file using the following code.
[Code]....
I am trying to access the current 'active' top level node from a sitemap repeater from outside of the ASP.NET repeater used to render it, this is for CSS styling purposes as I want to place the child nodes on the subsequent row with different styling horizontally. At present I have the following code which I can't get to display correctly using CSS.
[code]....
I would like to display the child nodes on the next light blue element which I can do perfectly well from a seperate div if this was not rendered using a child repeater. In the image below Blog and Services are top level nodes and their subseqent nodes (2 for each) should be displayed on the light-blue row below. Is this possible?
[Code]....
I want to have such a menu: How to display like this:> testAnother subOther siteMapNode, works.
I have 2 websites running on localhost in different ports. As browsers do not differentiate port numbers when sending cookies, my forms authentication ticket from one site is being sent to the other
How do I solve this? I thought that a good solution would be to change the forms authentication ticket or one of the websites but I don't know how to do this.
have a task to develope a calendar which should be able to save events/shedule/plan ... for that i want to develop a calendar control which contains one or two icon in each cell..when any one click on that icon another page will be open to show save tasks/events time wise.....i have worked on session calendar but i hvnt add any icon on each cell of calendar at that time....
View 7 RepliesI wanted to customize/Restrict the File Uploader control as follows:
1. To restrict Users to not to upload some type of file like.exe
2. To restrict the user to a specific size limit.
I also wanted to be able to display appropriate messages to the user if the abover restrictions are violated.
Can I use the validations control to achieve the above goals. As I am already using these controls to display appropriate messages to the user in case of wrong/invalid data.
How to replace url of browser according to pages like>>
I have a url with query string [URL] ....
I want url like this [URL] ....
In this case how we can find values of query strings...