Create UserControl with inline content

Let's say you want to create a user control that contains some literal text:
    This is some standard text message
Here is the simplest UserControl that matches this description:
using System.Web.UI;

[ParseChildren(ChildrenAsProperties = true,
               DefaultProperty = "Content")]
public partial class InlineContent : System.Web.UI.UserControl
    public string Content { get; set; }

Popular posts from this blog

Handling exceptions the right way in WCF (part 2)

Adding a delay before processing Textbox events

Change the deployment URL of a ClickOnce application