CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 5/8/2006 2:34:31 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 52 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
generics
Asp.Net User
Conditional display of sitemapnode5/8/2006 2:34:31 PM

0/0

How can I display a certain node only if a session object is set to true?

ie. I want

<siteMapNode url="profile.aspx" title="Profile" >

to be visible only if

Session["DISPLAY_PROFILE_NODE"] = true;

Thanks in advance.

 

 

chunshahab
Asp.Net User
Re: Conditional display of sitemapnode5/9/2006 1:21:48 PM

0/0

When will you set Session["DISPLAY_PROFILE_NODE"] = true;? Do you base on some kind of role? If yes, then you can use the role attribute in <siteMapNode>. For example, the Admin node only will show if the logon user is in Administrators role.

<

siteMapNode title="Admin" url="~/Admin/Default.aspx" description="Administrator Section" roles="Administrators">

Hope this helps.


Help Whenever You Can
Live Without Regret
generics
Asp.Net User
Re: Conditional display of sitemapnode5/10/2006 2:05:07 PM

0/0

 

Thank you but I am already aware of the security trimming feature. I want to display it only based on a session property. Thanks.

dannychen
Asp.Net User
Re: Conditional display of sitemapnode5/10/2006 2:59:07 PM

0/0

You really only have 2 choices here:  Filter at the control or filter at the provider

If you filter at the control you should implement the ItemDataBound or NodeDataBound event handlers for TreeView/Menu and remove those nodes as appropriate.  If you need a SiteMapPath to filter this way as well (which it doesn't sound like you do) you would need to handle this in a SiteMapResolve handler.

If you filter at the provider you need to create a custom provider and remove this node in code that overrides IsAccessibleToUser(). 

What you SHOULD NOT do under any circumstance is remove the node from the provider.  That will corrupt the datastore for other users accessible the information.

--
Danny


disclaimer: Information provided is 'as is' and conveys no warranties or guarantees.
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
March 2005 - Posts - ShowUsYour SiteMapNode node = e.Item.DataItem as SiteMapNode ; string display ... The agent may discover a condition that might interest the user and independently ...
Custom Site Map Providers in ASP.NET 2.0 Each sitemap node has Title, Description, and URL properties, and these are read next, in order to provide an appropriate display to the user. ...
Upender Manithia Dec 16, 2008 ... Reference the underlying SiteMapNode object. ... How to publish a Infopath Form · Conditional Display Formatting of Control in Infop. ...
Putting the CSS Friendly Control Adapters to work | Programming ... Conditional comments are used to add a special style sheet used only for previous ... 1" description=”Test 1″> Site Map in ASP.NET 3.5 Sep 29, 2008 ... Comparing Conditional Attributes in C/C++ versus C# ... The siteMapNode has a title and a url attribute that represent the title and URL of ...
Parent menu (horizontal) and child menu (vertical) How to have ... is the correct ...
Testking_70-551_v5 C. Embed the site map XML within the SiteMap node of a Web.sitemap file. ... You want to create a user control to manage the display of products. ...
Web-MA ASP.Net My Web Page Starter Kit Sitemap Editor Add in both files the following code into the condition's brackets: ... SiteMapNode smn = SiteMap.Provider.CurrentNode; if (smn != null) ...
Working with SiteMapDataSource Control in ASP.NET 3.5 Oct 6, 2008 ...
. . Now choose a DataSource for TreeView control. I will display the site map in a TreeView. As you can see below, ...
FHLB Statement of Work Mar 6, 2008 ... Make sure is syntactically correct. ... As a condition to exercising the rights and licenses granted hereunder, each Recipient ...




Search This Site:










personal web site starter kit

casting generic lists?

treeview - change line colour?

csk 2.0 ordersprovider error - cannot create an abstract class

skmmenu & editing the xml file

how to add an active x control in visual web developer?

forms authntication problem

email

more sql errors

custom validator and javascript - errors

needed support on event handling

text control

missing section appsettings

"cascading" tab index

sendkeys

adding information to membership database

is there additional skin objects?

activating users on godaddy

vs2005 html page slowdowns and freezeups

how to change the base class for both aspx and aspx.cs

rms

ms access

1 procedure populating formview and gridview

housing dnn modules within legacy asp page

the dotnetnuke experience is a disaster.

using user-defined or "generic" classes in asp.net

linking stylesheets

determining which button is clicked on a page

problems with iprinicipal in vb

table or other web contol : what use ?

 
All Times Are GMT