zoukankan      html  css  js  c++  java
  • 前台自动生成控件

    前台:

    <div id="location" runat="server">
    </div>

    后台:
        /// <summary> /// 自动生成button控件 /// </summary> public void GenerateControls() { StringBuilder strbHTMl = new StringBuilder(); strbHTMl.Append("<table>"); int count = 0; for (int i=0;i<100;i++) {//设置一行显示的控件个数 if (count == 0) { strbHTMl.Append("<tr>"); } if (count == 9) { strbHTMl.Append("</tr>"); count = 0; } strbHTMl.Append("<td>");    strbHTMl.Append("<input id="button" type="button" style="background:" + color + ";color:white;" value="" class="Button" >");
                 //strbHTMl.Append("<input   id="button" + garageNumber + "" type="button" style="background:" + color + ";color:white;" value="" + garageNumber + "" class="Button"    onclick=" window.showModalDialog('../LocationStatus.aspx/?Enter=" + garageNumber + "', '', 'dialogHeight=30;dialogWidth=60;dialogTop=30;dialogLeft=465;center=yes;resizable:no;scroll:no;status:no;help=no')" ">");
    //strbHTMl.Append("<input id="button" + garageNumber + "" type="button" style="background:" + color + ";color:white;" value="" + garageNumber + "" class="Button" onclick="window.open('../LocationStatus.aspx/?Enter=" + garageNumber + "', 'newwindow', 'height=450, width=900, top=300, left=490, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no')" ">"); strbHTMl.Append("</td>"); count++; } strbHTMl.Append("</table>"); location.InnerHtml = strbHTMl.ToString(); }
  • 相关阅读:
    微软 面试题
    SQL 公用表表达式(CTE)
    SQL 事务(Transaction)
    arch中pacman的使用
    arch中yaourt的安装和使用
    今天安装了arch,感觉不错,这速度可以
    纠结于arch+xfce还是xubuntu
    ubuntu 提速
    【转】linux下杀死进程
    【转】debian下的update-rc.d的使用
  • 原文地址:https://www.cnblogs.com/ingvner/p/7224549.html
Copyright © 2011-2022 走看看