#
lianly
我来自中国,刚接触Cuyahoga,就遇到问题:我的sample只是增加了button1按钮,但是点击button1没有反应?请帮助.谢谢
sample.ascx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Cuyahoga.Web.UI;
namespace Cuyahoga.Modules.Sample.web
{
public partial class sample :BaseModuleControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.Button1.Click += new EventHandler(Button1_Click);
this.Load += new EventHandler(this.Page_Load);
}
void Button1_Click(object sender, EventArgs e)
{
this.Label1.Text = this.TextBox1.Text.ToString();
}
#endregion
}
}
sample.ascx.cs
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Cuyahoga.Web.UI;
namespace Cuyahoga.Modules.Sample.web
{
public partial class sample :BaseModuleControl
{
protected void Page_Load(object sender, EventArgs e)
{
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.Button1.Click += new EventHandler(Button1_Click);
this.Load += new EventHandler(this.Page_Load);
}
void Button1_Click(object sender, EventArgs e)
{
this.Label1.Text = this.TextBox1.Text.ToString();
}
#endregion
}
}