using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;
namespace XFTextBox
{
/// <summary>
/// WebCustomControl1 的摘要说明。
/// </summary>
[DefaultProperty("Text"),
ToolboxData("<{0}:WebText runat=server></{0}:WebText>")]
public class WebText : System.Web.UI.WebControls.TextBox
{
private string text;
[Bindable(true),
Category("Appearance"),
DefaultValue("")]
public new string Text
{
get
{
text = (string) this.ViewState["Text"];
if (text != null)
{
return text.Replace("'","''");
}
return string.Empty;
}
set
{
this.ViewState["Text"] = value;
}
}
// /// <summary>
// /// 将此控件呈现给指定的输出参数。
// /// </summary>
// /// <param > 要写出到的 HTML 编写器 </param>
// protected override void Render(HtmlTextWriter output)
// {
// output.Write(Text);
// }
}
}