Gripe #4 – the solution

I almost included this in the original post, but the obvious solution is to override the control again. Nice and simple.
 

protected override void RenderContents(System.Web.UI.HtmlTextWriter writer)

{

   if (this.HasControls())

   {

      base.RenderContents(writer);

   }

   else

   {

      writer.Write(this.Context.Server.HtmlEncode(this.Text));

   }

}

 

Advertisements
This entry was posted in Computers and Internet. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s