Multple roles on a SiteMapNode

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
 
G

Guest

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
 
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

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
 
G

Guest

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.
 
C

Cal Who

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top