Setting custom control properties

Posted by Rob on Stack Overflow See other posts from Stack Overflow or by Rob
Published on 2010-04-20T20:24:27Z Indexed on 2010/04/20 20:33 UTC
Read the original article Hit count: 176

Filed under:
|
|

I though it would be very simple but I can not get it today.

I have a user control, with a grid control contained in it.

public Unit Width
{
    get
    {
        return CustomerGrid.Width;
    }
    set
    {
        CustomerGrid.Width = value;

    }
}

I expose the width property and when I set it in the designer it works at run-time but not design time.

What class do I inherit from or method to override to get my controls to function at design time.

Note I tried to inherit from WebControl but got the message

Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class 

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET