日期:2014-05-18  浏览次数:20401 次

关于response.write输出button控件,求帮忙
能否用response.write描述一个服务器控件button? 例如:response.write(<td><asp:button id="btn1" runat="sever" text="" onclick="button_onclick"/></td>);我想输出一个table 一列都是一个button控件 要求只能用response。write写出来 ,那个button 的id 怎么才能一列都不一样呢??求大侠帮忙

------解决方案--------------------
1楼正确,输出服务器端标记毫无意义。
HTML code

  for (int i = 0; i < 10; i++)
        {
            Response.Write("<td><input type='button' onclick='button_onclick()' id='btn" + i.ToString() + "'/></td>");
        }