Multple roles on a SiteMapNode

  • Thread starter Thread starter Cal Who
  • Start date Start date
C

Cal Who

I've been setting one role on a SiteMapNode elements but now I'd like to add
multiple roles to an element.

That is Roles="Admin, Fixer"

I'd do this rather that putting all Admins into the Fixer role.

I've read the documentation and it sounds like a IList constructor would do
it but I can't find out the details.

Is it possible to do and if so, how can I do that?

Thanks
 
I've been setting one role on a SiteMapNode elements but now I'd like to add
multiple roles to an element.

That is Roles="Admin, Fixer"

I'd do this rather that  putting all Admins into the Fixer role.

I've read the documentation and it sounds like a IList constructor would do
it but I can't find out the details.

Is it possible to do and if so, how can I do that?

Thanks

You should be able to specify multiple roles delimited by comma or
semi-colon as you have already.

The SiteMapNode.Roles Property expects an IList of roles of
System.Collections.IList
http://msdn.microsoft.com/en-us/library/system.web.sitemapnode.roles.aspx

Hope this helps
 
I've been setting one role on a SiteMapNode elements but now I'd like to
add
multiple roles to an element.

That is Roles="Admin, Fixer"

I'd do this rather that putting all Admins into the Fixer role.

I've read the documentation and it sounds like a IList constructor would
do
it but I can't find out the details.

Is it possible to do and if so, how can I do that?

Thanks

You should be able to specify multiple roles delimited by comma or
semi-colon as you have already.

The SiteMapNode.Roles Property expects an IList of roles of
System.Collections.IList
http://msdn.microsoft.com/en-us/library/system.web.sitemapnode.roles.aspx

Hope this helps



==

I had seen that before but did not understand the following which it
includes:

You can use the #ctor(SiteMapProvider, String, String, String, String,
IList, NameValueCollection, NameValueCollection) constructor to supply a
list of roles to the SiteMapNode object when it is first created.

I found "ctor" used many times on the Internet (without the #) but no
definition.

Reading about IList didn't help.

I'll try simply using Roles="Admin, Fixer"

but would feel better about it if I could find some documentation I could
understand.



Thanks
 
I had seen that before but did not understand the following which it
includes:

You can use the #ctor(SiteMapProvider, String, String, String, String,
IList, NameValueCollection, NameValueCollection) constructor to supply a
list of roles to the SiteMapNode object when it is first created.

I found "ctor" used many times on the Internet (without the #) but no
definition.

It's a typo, stays for "constructor", I believe. You can use the
constructor to supply... etc.

IList is a general type of collection.
 
I had seen that before but did not understand the following which it
includes:

You can use the #ctor(SiteMapProvider, String, String, String, String,
IList, NameValueCollection, NameValueCollection) constructor to supply a
list of roles to the SiteMapNode object when it is first created.

I found "ctor" used many times on the Internet (without the #) but no
definition.

It's a typo, stays for "constructor", I believe. You can use the
constructor to supply... etc.

IList is a general type of collection.

Reading about IList didn't help.

I'll try simply using Roles="Admin, Fixer"

but would feel better about it if I could find some documentation I could
understand.

Thanks


I read the documentation for the SiteMapNode Constructor and then that for
IList and just couldn't justify the a simple comma seperated list would
work. But it does and I just have to await an enlightment in the future.

Thanks a lot
 
Back
Top