Custom Controls ASP.Net Tutorial

File: FullyRenderedControl.cs
namespace myControls
{
    public class FullyRenderedControl : Control
    {
        private string _Text;
        public string Text
        {
            get { return _Text; }
            set { _Text = value; }
        }
        protected override void Render(HtmlTextWriter writer)
        {
            writer.Write(_Text);
        }
    }
}
File: Default.aspx
<%@ Page Language="C#" %>
<%@ Register TagPrefix="custom" Namespace="myControls" %>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


    Show Fully Rendered Control


    
    

            ID="FullyRenderedControl1"
        Text="Hello World!"
        runat="Server" />