Subclass Page, and expose a design-time property.

  • Thread starter Thread starter Brett Wiltshire
  • Start date Start date
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.
 
Back
Top