首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

关于response.write输出button控件,求帮忙解决方案

2012-04-23 
关于response.write输出button控件,求帮忙能否用response.write描述一个服务器控件button? 例如:response.

关于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>");        } 

热点排行