这个代码什么意思?
using System;using System.ComponentModel;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace essay
{
public class myButton:WebControl,IPostBackEventHandler
{
public virtual string Text
{
get
{
string s =(string)ViewState["Text"];
return (s==null)?string.Empty:s;
}
set {ViewState["Text"]=value;}
}
protected override void Render(HtmlTextWriter writer)
{
writer.Write("<INPUT TYPE=submit name=" + this.UniqueID + " Value='"+this.Text+"' />");
}
public event EventHandler Click;
void IPostBackEventHandler.RaisePostBackEvent(string eventArgument)
{ OnClick(EventArgs.Empty); }
protected virtual void OnClick(EventArgs e)
{ if(Click!=null)Click(this,e); }
}
} --------------------编程问答-------------------- 是一个自己写的提交按钮的控件吧
补充:.NET技术 , ASP.NET