Geeks With Blogs
Dennis Bottjer | MVP

No matter what your .NET language of choice is all .NET languages use base classes contained within the namespaces of the .NET Framework.  Knowing them well can save you much time.

 

When building custom sever controls I like to include the following two namespaces:

 

System.Drawing

System.ComponentModel

 

Among other things the System.Drawing namespace allows you to specify a Tool Box Bitmap image for you Custom Server Control which really gives the control a professional touch.  To specify a Tool Box Bitmap Image you would add the following attribute to you custom control class:

 

ToolboxBitmap(typeof(System.Web.UI.WebControls.TextBox)

 

Notice the use of the typeof method to display a TextBox Bitmap.

 

The System.ComponentModel namespace is needed to specify category attributes to the properties of your server control.  This will help you organize your properties in the property window according to use.

Posted on Saturday, December 10, 2005 1:18 AM ASP.NET | Back to top


Comments on this post: Useful Custom Server Control Namespaces

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © DennisBottjer | Powered by: GeeksWithBlogs.net