I have a simple Webpart which has label control displaying some text, but I don't know why Label control's text is not rendered as html encoded. I have worked with ASP.NET site development and it encodes in it.
So my questions that why it is left not to encode in SharePoint but Asp.Net sites.
protected override void CreateChildControls()
{
Label myLable = new Label();
myLable = "<h1>Hello World</h1>";
}