;
//回调函数,回调参数值:eventArgument
public void RaisePostBackEvent(string eventArgument)
{
Context.Response.Write("第"+eventArgument+"次点击");
i = int.Parse(eventArgument);
}
//控件呈现,Control类重写,传送参数至客户端
protected override void Render(HtmlTextWriter output)
{
output.Write("<input type=\"button\" name = " + this.UniqueID +
" Value = 'Click Me' onclick=\"javascript:"+Page.ClientScript.GetPostBackEventReference(this,(i+1).ToString())+"\"/>");
}
}
}