I read this, which gives an explanation when you select Web Control or Control when creating custom controls, but this is not enough. I have seen that user controls are inherited either because they drop stuff into the user interface.
http://msdn.microsoft.com/en-us/library/yhzc935f.aspx
"If your control displays a user interface (UI) or any other visible element on the client, you should get your control from System.Web.UI.WebControls .. ::. WebControl (or a derived class). If your control displays an element that is not visible in the browser, such as a hidden element or a meta element, takes your control out of System.Web.UI .. ::. Control. The WebControl class comes from the control and adds a style like Font, ForeColor and BackColor In addition, the control that comes from WebControl, works in ASP.NET theme functions without any extra work on your part. "
so the only reason to use WebControl is that you want to use your styling functions? I'm just going to output strings using stringbuilder utlimately, so I don't care. I would prefer to use a straightforward design and rows without tables to form my HTML code, which I need anyway.
source
share