Subclass Page, and expose a design-time property.

B

Brett Wiltshire

Hi,

I have subclassed System.Web.UI.Page. (Well done me).

Pages in my project should be accessed based on a user's membership to
a Role. Membership to a Role is determined by a small API provided by
the client along the lines of:

if ( ! IsInRole(accountName, roleName) )
{
// Redirect to "No Permissions" page.
}

So far, so simple.

My subclassed Page has a protected property, List<string>
AllowedRoleNames, which currently has to be set in the OnPreInit()
method. The security check is made in the OnInit() method.

What I'd like to do, is expose this property at design time so that
the programmer can modify the list though a properties dialog, much
like setting up list items for a list box. But I don't seem to be
able to make it a browsable property.

Has anyone faced this before?

Cheers,
Brett.
 

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

Staff online

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top