自定义textbox控件怎么取得到输入的value值和保存返回!
下面是我定义的一个textbox控件,怎么每次在onblur后输入的都没有了!我怎么去保存输入的值或者取得!
回答者不要说继承textbox类!
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Security;
using System.Security.Permissions;
using System.Drawing;
namespace ValidateTextInput
{
[DefaultProperty( "Input ")]
[ToolboxData( " <{0}:ValidateInput runat=server> </{0}:ValidateInput> ")]
public class ValidateInput: Control,IPostBackEventHandler
{
[Bindable(true),
Category( "Appearance "),
DefaultValue( " "),
Description( "文本值 "),
Localizable(true),
PersistenceMode(PersistenceMode.InnerDefaultProperty)
]
public virtual string Text
{
get
{
string s = (string)ViewState[ "Text "];
return (s == null) ? String.Empty : s;
}
set
{
ViewState[ "Text "] = value;
}
}
[Bindable(true),
Category( "Appearance "),
DefaultValue( " "),
Description( "文本值 "),
Localizable(true),
PersistenceMode(PersistenceMode.InnerDefaultProperty)
]
&nb