Tell Visual Studio what prefix to use with your custom server controls
If you work on a library of custom server controls for ASP.NET, you might have noticed that when you drag your custom server control onto design surface, cc1 is used to prefix your control. It is getting pretty boring after a while. If you take a close look at the ASP.NET controls, you will notice that they are always prefixed by asp automatically.
How can your library enjoy this little but really nifty feature? Just use TagPrefix attribute. It is an assembly level attribute, so make sure you stick it in the AssemblyInfo.cs of your project.
Here is an example usage:
[assembly: TagPrefix("SashaSydoruk.PDX.Web.UI.WebControls", "pdx")]
To find out more - MSDN article
No comments yet. Be the first.
Leave a reply