1
与动态点击事件动态锚标记当我点击锚标记,页面获取回传,所以没有任何我怎么也产生在asp.net
代码如下图所示,
System.Web.UI.HtmlControls.HtmlAnchor anchor1 = new System.Web.UI.HtmlControls.HtmlAnchor();
anchor1.InnerText = "Edit";
anchor1.Attributes.Add("runat", "server");
anchor1.Attributes.Add("onServerClick", "anchor1_Click");
anchor1.Style.Add("color", "blue");
anchor1.Style.Add("float", "right");
protected void anchor1_Click(object sender, EventArgs e) {
ScriptManager.RegisterStartupScript(this, this.GetType(), "msg", "alert('Enter Value For Drop Down Name');", true);
}