[DefaultEvent(“MyCustomEvent”)
public partial class WebUserControl1 : System.Web.UI.UserControl
{
public delegate void onButtonClick(object sender, Myeventargs e);
public event onButtonClick btnHandler;
protected void ASPxButton1_Click(object sender, EventArgs e)
{
if (btnHandler != null)
{
btnHandler(this,e);
iii
iii
iii
this code can work with public partial class jscript : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) {
XFButton1.MYClick += new EventHandler(XFButton1_MYClick);
iii
void XFButton1_MYClick(object sender, EventArgs e)
{
ASPxLabel1.Text = "Hello";
iii
但是,问题在于,如果在纽特州两度点击,它就自动产生新的事件。 能否通过使用网络用户控制来做到这一点?