Prevent Web Custom Control Appearing in the Toolbox

Discussion in 'ASP .Net' started by Just Me, Dec 26, 2007.

  1. Just Me

    Just Me Guest

    I want a Base Class to derive my other web controls from, but I dont want it
    to appear in the toolbox, I think there must be a class attribute for this,
    can anyone tell me the exact syntax I need to use for this.

    I have written it in C#
     
    Just Me, Dec 26, 2007
    #1
    1. Advertising

  2. Hi,

    ToolboxItemAttribute is what you are looking for. The usage to hide the
    control from the toolbox is shown below.

    [System.ComponentModel.ToolboxItem(false)]
    protected class MyControl : .....
    {

    }



    --
    All the best,
    Coskun SUNALI
    MVP ASP/ASP.NET
    http://sunali.com


    "Just Me" <news.microsoft.com> wrote in message
    news:...
    >I want a Base Class to derive my other web controls from, but I dont want
    >it to appear in the toolbox, I think there must be a class attribute for
    >this, can anyone tell me the exact syntax I need to use for this.
    >
    > I have written it in C#
    >
    >
    >
    >
     
    Coskun SUNALI [MVP], Dec 26, 2007
    #2
    1. Advertising

  3. Just Me

    Just Me Guest

    Excellent Advice. Just what I needed. - Thank You !


    "Coskun SUNALI [MVP]" <> wrote in message
    news:...
    > Hi,
    >
    > ToolboxItemAttribute is what you are looking for. The usage to hide the
    > control from the toolbox is shown below.
    >
    > [System.ComponentModel.ToolboxItem(false)]
    > protected class MyControl : .....
    > {
    >
    > }
    >
    >
    >
    > --
    > All the best,
    > Coskun SUNALI
    > MVP ASP/ASP.NET
    > http://sunali.com
    >
    >
    > "Just Me" <news.microsoft.com> wrote in message
    > news:...
    >>I want a Base Class to derive my other web controls from, but I dont want
    >>it to appear in the toolbox, I think there must be a class attribute for
    >>this, can anyone tell me the exact syntax I need to use for this.
    >>
    >> I have written it in C#
    >>
    >>
    >>
    >>

    >
     
    Just Me, Dec 26, 2007
    #3
  4. Hi,

    You are always welcome. I also responded to one of your other questions
    [Document Dom / Table Events Problems]. Most probably, you haven't seen it
    yet because it was 7 days old. If you are still looking for a solution, it
    is waiting there for you.


    --
    All the best,
    Coskun SUNALI
    MVP ASP/ASP.NET
    http://sunali.com


    "Just Me" <news.microsoft.com> wrote in message
    news:...
    > Excellent Advice. Just what I needed. - Thank You !
    >
    >
    > "Coskun SUNALI [MVP]" <> wrote in message
    > news:...
    >> Hi,
    >>
    >> ToolboxItemAttribute is what you are looking for. The usage to hide the
    >> control from the toolbox is shown below.
    >>
    >> [System.ComponentModel.ToolboxItem(false)]
    >> protected class MyControl : .....
    >> {
    >>
    >> }
    >>
    >>
    >>
    >> --
    >> All the best,
    >> Coskun SUNALI
    >> MVP ASP/ASP.NET
    >> http://sunali.com
    >>
    >>
    >> "Just Me" <news.microsoft.com> wrote in message
    >> news:...
    >>>I want a Base Class to derive my other web controls from, but I dont want
    >>>it to appear in the toolbox, I think there must be a class attribute for
    >>>this, can anyone tell me the exact syntax I need to use for this.
    >>>
    >>> I have written it in C#
    >>>
    >>>
    >>>
    >>>

    >>

    >
    >
     
    Coskun SUNALI [MVP], Dec 26, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VmFkaW0=?=
    Replies:
    1
    Views:
    390
    =?Utf-8?B?VmFkaW0=?=
    Jan 20, 2005
  2. =?Utf-8?B?RGF2ZQ==?=
    Replies:
    0
    Views:
    350
    =?Utf-8?B?RGF2ZQ==?=
    Sep 27, 2006
  3. christopherbouy
    Replies:
    0
    Views:
    518
    christopherbouy
    Aug 1, 2007
  4. Replies:
    4
    Views:
    407
    red floyd
    Aug 23, 2007
  5. Richard
    Replies:
    5
    Views:
    118
    Kimmo Laine
    Aug 13, 2005
Loading...

Share This Page