HTML如下
代碼如下:
<tr>
<td class="leftTd" style="width: 107px">附加金額</td>
<td style="width: 315px"><asp:TextBox ID="txtExtendMoney" Text="0" runat="server"></asp:TextBox>
<asp:RegularExpressionValidator ID="regExtend" runat="server" ControlToValidate="txtExtendMoney" Display="Dynamic" ErrorMessage="格式不正確" ValidationExpression="[1-9]d*.d*|0.d*[1-9]d*|^[1-9]d*|0"></asp:RegularExpressionValidator>
<asp:RequiredFieldValidator ID="reqExtedNo" runat="server" ControlToValidate="txtExtendMoney" Display="Dynamic" ErrorMessage="不可為空"></asp:RequiredFieldValidator></td>
<td class="leftTd">結算方式</td>
<td><asp:DropDownList ID="ddlPayType" runat="server"><asp:ListItem>現金</asp:ListItem><asp:ListItem>銀行轉賬</asp:ListItem></asp:DropDownList></td>
</tr>
<tr>
<td class="leftTd">結算賬戶</td>
<td colspan="3"><asp:RadioButtonList ID="rdbPayAccountBank" runat="server" RepeatLayout="Flow"></asp:RadioButtonList></td>
</tr>
最後一個RadioButtonList的ListItem為“其他賬戶",當選中時,其後增加相應的asp.net服務器控件。選擇其