ASP.NET closing tag
See the question and my original answer on StackOverflowThis is because ASP.NET's Label
control is decorated with the ParseChildrenAttribute, with ParseChildren(false)
while CheckBox
isn't.
You can support the same behavior whith your custom controls, for example, with the following code, Visual Studio will behave like Label if you use MyControl in the web form editor:
[ParseChildren(false)]
public class MyControl : WebControl
{
...
}