<fieldset style="width:80%; float:left">
<legend>计算成本预算</legend>
<table id="cost" class="zifei" style="margin-left:50px">
<tr><th>成本类别名称</th><th>价格/人</th><th>详情/备注</th><th></th></tr>
<tr>
<td>
<asp:TextBox ID="txtNamtCostType" runat="server"></asp:TextBox></td>
<td>
<asp:TextBox ID="txtPriceCost" runat="server" Width="50px"></asp:TextBox></td>
<td><asp:TextBox ID="txtNoteCost" runat="server"></asp:TextBox></td>
<td><asp:Button Text="删除" runat="server" ID="btnCostDelete"
onclick="btnCostDelete_Click" /></td></tr>
</table>
<div style="width:150px; float:right; margin-top:10px; margin-bottom:10px">
<asp:Button ID="btn_AddCostNew" Text="添加新成本" runat="server"
onclick="btn_AddCostNew_Click" /></div>
<div style="width:150px; float:right; margin-top:10px; margin-bottom:10px">成本合计:<asp:Label runat="server" ID="lbCost" Text=""></asp:Label></div>
麻烦问下各位大哥 如果我想在点击“添加新成本”按钮的时候 动态添加一条下面TR里面的控件,该如何在CS代码里面写。不用JS写。求告知
<tr>
<td>
<asp:TextBox ID="txtNamtCostType" runat="server"></asp:TextBox></td>
<td>
<asp:TextBox ID="txtPriceCost" runat="server" Width="50px"></asp:TextBox></td>
<td><asp:TextBox ID="txtNoteCost" runat="server"></asp:TextBox></td>
<td><asp:Button Text="删除" runat="server" ID="btnCostDelete"
onclick="btnCostDelete_Click" /></td>
</tr> </fieldset>
<legend>计算成本预算</legend>
<table id="cost" class="zifei" style="margin-left:50px">
<tr><th>成本类别名称</th><th>价格/人</th><th>详情/备注</th><th></th></tr>
<tr>
<td>
<asp:TextBox ID="txtNamtCostType" runat="server"></asp:TextBox></td>
<td>
<asp:TextBox ID="txtPriceCost" runat="server" Width="50px"></asp:TextBox></td>
<td><asp:TextBox ID="txtNoteCost" runat="server"></asp:TextBox></td>
<td><asp:Button Text="删除" runat="server" ID="btnCostDelete"
onclick="btnCostDelete_Click" /></td></tr>
</table>
<div style="width:150px; float:right; margin-top:10px; margin-bottom:10px">
<asp:Button ID="btn_AddCostNew" Text="添加新成本" runat="server"
onclick="btn_AddCostNew_Click" /></div>
<div style="width:150px; float:right; margin-top:10px; margin-bottom:10px">成本合计:<asp:Label runat="server" ID="lbCost" Text=""></asp:Label></div>
麻烦问下各位大哥 如果我想在点击“添加新成本”按钮的时候 动态添加一条下面TR里面的控件,该如何在CS代码里面写。不用JS写。求告知
<tr>
<td>
<asp:TextBox ID="txtNamtCostType" runat="server"></asp:TextBox></td>
<td>
<asp:TextBox ID="txtPriceCost" runat="server" Width="50px"></asp:TextBox></td>
<td><asp:TextBox ID="txtNoteCost" runat="server"></asp:TextBox></td>
<td><asp:Button Text="删除" runat="server" ID="btnCostDelete"
onclick="btnCostDelete_Click" /></td>
</tr> </fieldset>
再一个就是控制的大小`位置 颜色什么的 最麻烦的就是你动态添加了控件以后 跟数据库怎么连上去`字段对应上去啊 动态生成字段没问题 但是在web
上就要考虑到安全问题了` 这样的很容易被攻击`