<%@ Page language="C#" %>
<%@ Register TagPrefix="Control" Namespace="Control" Assembly="Control" %>
File: Control.cs
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace Control
{
[DefaultProperty("Text"), ToolboxData("<{0}:Control runat=server>{0}:Control>")]
public class SimpleControl : System.Web.UI.WebControls.WebControl
{
private string _text;
[Bindable(true),
Category("Appearance"),
DefaultValue("")]
public string Text
{
get
{
return _text;
}
set
{
_text = value;
}
}
protected override void Render(HtmlTextWriter output)
{
output.Write(Text);
}
}
}