asp.net中repeater嵌套CheckBoxList,RadioButtonList来完成投票

我们在做复式投票的时候。会遇到标题和选项嵌套的样子,下面我把我的代码放上来。 1,投票选择前台页面 view plaincopy to clipboardprint?
<table height="286" cellSpacing="0" cellPadding="0" width="1000" align="center" bgColor="#ffffff" 
 
                border="0"> 
 
                <tbody> 
 
                    <tr> 
 
                        <td vAlign="top" height="286"> 
 
                            <div align="left"> 
 
                                <table height="32" cellSpacing="0" cellPadding="0" width="968" align="center" border="0"> 
 
                                    <tbody> 
 
                                        <tr> 
 
                                            <td> 
 
                                                <div align="center"></div> 
 
                                                <div align="center"><strong><%=Title%></strong><br> 
 
                                                </div> 
 
                                            </td> 
 
                                        </tr> 
 
                                    </tbody> 
 
                                </table> 
 
                                <table cellSpacing="0" cellPadding="0" width="915" align="center" border="0"> 
 
                                    <tbody> 
 
                                        <tr> 
 
                                            <td background="../../images/house4_07.jpg" height="1"><FONT face="宋体"></FONT></td> 
 
                                        </tr> 
 
                                        <tr> 
 
                                            <td> 
 
                                                <table cellSpacing="0" cellPadding="0" width="915" border="0"> 
 
                                                    <asp:repeater id="Repeater1" Runat="server"> 
 
                                                        <ItemTemplate> 
 
                                                            <tr> 
 
                                                                <td> 
 
                                                                    <%# DataBinder.Eval(Container, "DataItem.FVoteName") %> 
 
                                                                    <table width="85%" align="center" border="1" bordercolor="#D6E7FF" cellpadding="0" cellspacing="0"> 
 
                                                                        <tr> 
 
                                                                            <td> 
 
                                                                                <asp:CheckBoxList id="cb" Runat="server" Visible="False"></asp:CheckBoxList> 
 
                                                                                <asp:RadioButtonList ID="rb" Runat="server" Visible="False"></asp:RadioButtonList> 
 
                                                                                <asp:TextBox ID="tb" TextMode="MultiLine" Columns="40" Rows="4" Runat="server" Visible="False"></asp:TextBox> 
 
                                                                                <input type="hidden" id="hb" runat="server" /> 
 
                                                                            </td> 
 
                                                                        </tr> 
 
                                                                    </table> 
 
                                                                </td> 
 
                                                            </tr> 
 
                                                        </ItemTemplate> 
 
                                                    </asp:repeater></table> 
 
                                            </td> 
 
                                        </tr> 
 
                                        <tr> 
 
                                            <td align="center"><asp:button id="btnAdd" runat="server" Text="提交"></asp:button></td> 
 
                                        </tr> 
 
                                    </tbody> 
 
                                </table> 
 
                            </div> 
 
                            <div align="right"></div> 
 
                        </td> 
 
                    </tr> 
 
                </tbody> 
 
            </table> 

<table height="286" cellSpacing="0" cellPadding="0" width="1000" align="center" bgColor="#ffffff"

    border="0">

    <tbody>

     <tr>

      <td vAlign="top" height="286">

       <div align="left">

        <table height="32" cellSpacing="0" cellPadding="0" width="968" align="center" border="0">

         <tbody>

          <tr>

           <td>

            <div align="center"></div>

            <div align="center"><strong><%=Title%></strong><br>

            </div>

           </td>

          </tr>

         </tbody>

        </table>

        <table cellSpacing="0" cellPadding="0" width="915" align="center" border="0">

         <tbody>

          <tr>

           <td background="../../images/house4_07.jpg" height="1"%

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值