我想在builder.Append()中添加一个按钮事件 但是我代码写进去后显示不出来我很郁闷 求走过路过的大神帮帮忙急! builder.Append("<div style='margin-top:3px;'>");
builder.Append("<a href='EditStar.aspx?ID=" + pollItem.ID + "'>[编辑]</a>");
builder.Append("(" + pollItem.Status + ")<br/>");
builder.Append(dep + " ");
builder.Append(name);
builder.Append("</br>");
builder.Append("<table bgcolor=\"#a0c0e7\"/>");
builder.Append("<tr><td> <asp:Button ID=\"btnRate\" runat=\"server\" Text=\"投票\" OnClick=\"btnRate_Click\" CssClass=\"menubtn2\" Visible=\"true\"/></td></tr></table>"); builder.Append("</div>");
builder.Append("<a href='EditStar.aspx?ID=" + pollItem.ID + "'>[编辑]</a>");
builder.Append("(" + pollItem.Status + ")<br/>");
builder.Append(dep + " ");
builder.Append(name);
builder.Append("</br>");
builder.Append("<table bgcolor=\"#a0c0e7\"/>");
builder.Append("<tr><td> <asp:Button ID=\"btnRate\" runat=\"server\" Text=\"投票\" OnClick=\"btnRate_Click\" CssClass=\"menubtn2\" Visible=\"true\"/></td></tr></table>"); builder.Append("</div>");
这样只是加一个前台按钮,onclick="定义一个js方法吧"
怎样动态添加服务器控件,去看看别人的代码。