Say I use the standard Panel server control:
<asp:Panel runat="server">
Hello, world!
</asp:Panel>
It will render with the indenting maintained:
<div>
Hello, world!
</div>
I then create a custom server control that does nothing except inherit Panel:
namespace e3.Web.UI
{
public class Panel : System.Web.UI.WebControls.Panel
{
public Panel()
{
}
}
}
Now I use my inherited Panel server control:
<e3:Panel runat="server">
Hello, world!
</e3:Panel>
When rendered, the closing tag's indent is not maintained:
<div>
Hello, world!
</div>
Obviously, I have not changed anything within the server control's logic ... it is an unchanged inheritance. Yet the rendering is different.
How can I get my custom server controls' closing tags to maintain the correct indentation?
(I know it's a superficial concern ... but it's really bugging me!)
Thanks to anyone who can shed some light on this for me ...
Alister