CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 10/13/2005 9:04:27 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 7 Views: 56 Favorited: 0 Favorite
8 Items, 1 Pages 1 |< << Go >> >|
wyx2000
Asp.Net User
Is there a way to hide treeview node value from showing up in the page for security? thanks!10/13/2005 9:04:27 PM

0

thanks!
akibbie
Asp.Net User
Re: Is there a way to hide treeview node value from showing up in the page for security? thanks!10/13/2005 10:55:31 PM

0

Yep, roles.

http://www.codeproject.com/aspnet/aspnet2security.asp This is a good article on extending the use of roles in choosing which of your sitemap elements you want visible to whom.  I am however making the assumption you are using the sitemap for your treeview.  You can make other sitemaps and register them in the web.config for special case use if you like as well.

HTH,
Aaron
I find that the harder I work the more luck I seem to have.
wyx2000
Asp.Net User
Re: Is there a way to hide treeview node value from showing up in the page for security? thanks!10/14/2005 12:36:20 AM

0

Thanks for you reply.

But that is not I want. I am talking about a treeview, when you move your mouse on top of a node, you can tell it is value be used to postback to server to open that node. I am looking for a way to prevent user from seeing that node value.

 

Dave Sussman
Asp.Net User
Re: Is there a way to hide treeview node value from showing up in the page for security? thanks!10/14/2005 8:31:35 AM

0

Actually, while this article provides code that works, it is based on an incorrect assumption and one that has been covered several times in this forum. The roles attribute on the siteMapNode does NOT restrict node visibility based upon the role, it actually makes the node visible. Node visibility is controlled by the authorization section of web.config, either globally, or individually with location tags.
 
Using authorization this way, which is not just roles as it can be user based, secures pages. A secured page will not be accessible, whether accessed directly or seen via the sitemap. The sitemap providers (which the SiteMapDataSource control uses) will not show nodes if the user isn't authenticated for that node. So if you use a TreeViewfor navigation then you get this feature automatically.
 
The use of the roles attribute on a SiteMapNode allows for the node to be visible on a menu control (Menu or TreeView), even if the user isn't authorized to access the page. Trying to access the page will redirect you to the login page.
 
Dave
<akibbie> wrote in message news:[email protected]...
Yep, roles.

http://www..codeproject.com/aspnet/aspnet2security.asp This is a good article on extending the use of roles in choosing which of your sitemap elements you want visible to whom.  I am however making the assumption you are using the sitemap for your treeview.  You can make other sitemaps and register them in the web.config for special case use if you like as well.

HTH,
Aaron

http://forums.asp.net/1082251/ShowPost.aspx#1082377

wyx2000
Asp.Net User
Re: Is there a way to hide treeview node value from showing up in the page for security? thanks!10/14/2005 8:42:03 AM

0

Please help me on my issue:

"I am talking about a treeview, when you move your mouse on top of a node, you can tell it is value be used to postback to server to open that node. I am looking for a way to prevent user from seeing that node value."



The roles isn't a problem to me, I had my own sitemapprovider, and I had solved issues of roles already.



Dave Sussman
Asp.Net User
Re: Is there a way to hide treeview node value from showing up in the page for security? thanks!10/14/2005 10:16:15 AM

0

The treeview elements are links, and it's the browser that shows the target of the link. There's nothing that I know of that can hide this.

d
akibbie
Asp.Net User
Re: Is there a way to hide treeview node value from showing up in the page for security? thanks!10/14/2005 12:52:29 PM

0

Hmmm, well I guess I had it all wrong  *grimmace* Dave is right, when it renders it is just an anchor tag.  So sorry about that.  Have you seen this behavior elsewhere, the hidden links?  If you give an example of what you have seen that you want to duplicate maybe we can find a solution.

Aaron
I find that the harder I work the more luck I seem to have.
Dave Sussman
Asp.Net User
Re: Is there a way to hide treeview node value from showing up in the page for security? thanks!10/14/2005 1:09:24 PM

0

Actually, doesn't the treeview have a postback mode, where instead of links it creates LinkButton controls, so each node does a postback. This would then only show the __doPostback stuff in the status area in the browser. You could then redirect in the postback event. Not that I think this is a good idea from the usability perspective.

As an aside, why do you need to hide the target? If the user clicks they will get to the page and it will show in the address bar anyway.

d
8 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
Is there a way to hide treeview node value from showing up in the ... Is there a way to hide treeview node value from showing up in the page for security? thanks! Last post 10-14-2005 9:09 AM by Dave Sussman. ...
TheMSsForum.com >> VB >> treenode.clone method - The Microsoft ... Many Thanks In Advance Tag: treenode.clone method Tag: 225112 ... is there an easy way to covert these decimal values into a usable date for vb? Thanks for ...
CodeProject: ASP.NET TreeView Control & the Client's Browser. Free ... Unless I missed something, there is no way to pass the node data along to ... how to use treeview control without showing the root node, thanks for the help ...
bassistance.de » jQuery plugin: Treeview @Isaac: Nope, I wasn’t aware of it, thanks for bringing it up. ..... Is there a way to dynamically removed nodes from the treeview? ...
CodeProject: ASP.NET Splitter Bar - Resize panels, table cells ... NET Framework"> Jeff Prosise's Blog : Hiding the Root Node from SiteMapPath map from the current node up to the node below the root node and .... I have a treeview that has several "Root Level" nodes (Yes, I know there is only one ...
ASP.NET 2.0 Site Navigation Features - ScottGu's Blog If you look at my code sample you'll see why this is showing up: .... So is there a way to hide or show certain elements of the Sitemap in my menu based on ...
Mole v4.2 For Visual Studio « Karl On WPF - .Net The TreeNode (actually MoleTreeNode) text is formatted as follows: ..... and sometimes the best way to do that is to see what property values are different ...
.NET C# Page 90 - Bytes Site Map How to resize a TreeNode after changing its font? ... writing DateTime/TimeSpan values to a stream. Is there a shortcut? Format System. ...
CodeProject: Easy DHTML treeview. Free source code and programming ... There is, however, a more elegant way of implementing a treeview using only ..... Make sure the tree generates each node with the same unique ID value each ...












treeview layout problem with show lines (with ie7 or firefox)

dot net menu

asp.net page reload

reference controls in masterpage from class in app_code

creating indexing for treeview control

request.browser: how to change css file from server-side script?

multiview and back button

treeview and the navigateurl not working

trying to publish website - getting master page errors

how to display asp page as content page in .net

masterpage reloads every time i open a contentpage

sitemap issue: enable securitytrimming will disable external link in sitemap

could not center the text in an horizontal menu control

applying theme programmatically to all pages

using drop down list to programatically change themes

themes / skins

treeview bug

master page with selection from list to display selection details

query regarding menu control in master page

roles and sitemap

treeview and xml -- suppress the first node

my images are not seen.

sitemap click event handler

back button causes masterpage width to change

accessing multimode menu in masterpage

asp.net 2.0 treeview control - making certain child nodes invisible based on sitemap xml file?

problem with master pages

master page problem with <iframe>

master/content page control referencing???

how to add html tag in a aspx page which is under a master page?

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT