nologo said:
i wish to store a users custom role in a viewstate...
is this advised?or shall i use profiles?
sorry im a new comer to asp.net so not sure of all the tricks etc.
The ViewState only applies to the current page; it will be lost as soon
as the user navigates to a different page. So it wouln't be adequate for
storing a user's role.
Profiles might be a good choice depending on what you mean by "custom
role". Other alternatives would be the Session state, or a Cookie, or a
GenericIdentity in the current Thread, depending on what you are trying to
accomplish, how you manage roles and when you wish to apply them. Have you
taken a look at the built-in RoleManager?