网页codebehind的.cs文件里的代码:
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);
}
为毛vs2012说特么button/bt没有text?
求大神指点
Visual?Studio?2012
c#
ASP.NET
------解决方案--------------------
http://blog.csdn.net/gannanhu/article/details/8507712
目测可以解决你的问题