日期:2014-05-16 浏览次数:21044 次
protected void Page_Load(object sender, EventArgs e)
{
Button bt = new Button();
bt.ID = "btnSave";
bt.Text = "Save";
bt.Click += new System.EventHandler(btnSave_Click);
protected void btnSave_Click(object sender, EventArgs e)
{
//do something when button clicked.
ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + "dfasd" + "');", true);
}