HighTechTalks DotNet Forums  

Prevent Web Custom Control Appearing in the Toolbox

ASP.net ASP.net discussions (microsoft.public.dotnet.framework.aspnet)


Discuss Prevent Web Custom Control Appearing in the Toolbox in the ASP.net forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Just Me
 
Posts: n/a

Default Prevent Web Custom Control Appearing in the Toolbox - 12-26-2007 , 09:25 AM






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#





Reply With Quote
  #2  
Old   
Coskun SUNALI [MVP]
 
Posts: n/a

Default Re: Prevent Web Custom Control Appearing in the Toolbox - 12-26-2007 , 10:33 AM






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

Quote:
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#






Reply With Quote
  #3  
Old   
Just Me
 
Posts: n/a

Default Re: Prevent Web Custom Control Appearing in the Toolbox - 12-26-2007 , 11:28 AM



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


"Coskun SUNALI [MVP]" <Coskun (AT) SUNALI (DOT) com> wrote

Quote:
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:uZN5Xt8RIHA.5016 (AT) TK2MSFTNGP06 (DOT) phx.gbl...
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#








Reply With Quote
  #4  
Old   
Coskun SUNALI [MVP]
 
Posts: n/a

Default Re: Prevent Web Custom Control Appearing in the Toolbox - 12-26-2007 , 11:52 AM



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

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


"Coskun SUNALI [MVP]" <Coskun (AT) SUNALI (DOT) com> wrote in message
news:uq3HjS9RIHA.5160 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
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:uZN5Xt8RIHA.5016 (AT) TK2MSFTNGP06 (DOT) phx.gbl...
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#









Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.