General ServerControl syntax?

Is there a way I can manage the server

MyControl<T> 

so that I can register and use it on an aspx page like

 <mc:MyControl<ThingForControlToUse> ID="instanceOfMyControl" runat="server" 

Obviously, the developer does not like this, are there any cool ways around him, except for creating a not common shell with a type parameter?

+4
source share
2 answers

Common tag names are not possible in ASP.NET, see this article: General Controls

You are on the right track, thinking that you need to create a wrapper with the TYPE parameter.

+6
source

Quick note. I'm not sure if this is true in Visual Studio 2008, but if you had this control in a project that you edited with Visual Studio 2005, you would have completely broken intellisense with this control. When Visual Studio tries to create XML schema files for intellisense pop-ups in markup files, it completely breaks when it sees common controls like this and leaves the schema file completely, leaving you without intellisense for any controls in this assembly.

0
source

All Articles