Prevent Web Custom Control Appearing in the Toolbox

J

Just Me

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#
 
C

Coskun SUNALI [MVP]

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 : .....
{

}
 
J

Just Me

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


Coskun SUNALI said:
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 said:
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#
 
C

Coskun SUNALI [MVP]

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 said:
Excellent Advice. Just what I needed. - Thank You !


Coskun SUNALI said:
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 said:
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#
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top