我在后面的 C# 代码中添加 Asp:Button Controls。但是当页面在浏览器中加载时,按钮不会出现在页面上。这是我的一段代码
html.Append("<table>");
html.Append("<tr><th>Student Name</th><th>Operations</th>");
while (msdr.Read())
{
html.Append("<tr>");
html.Append("<td>" + msdr[0] + "</td>");
html.Append("<td align='center'><asp:Button ID='btnAdd' runat='server' OnClick='BtnAddStd_Click' Text='Add' /></td>");
html.Append("</tr>");
}
html.Append("</table>");
Placeholder1.Controls.Add(new Literal { Text = html.ToString() });