日期:2014-05-17  浏览次数:20429 次

ASP.NET.利用repeater控件中制作表格问题
大家看到这个图片,与Driver一行的,第二列是由很多行组成,这里的行数不定,有数据库的存储个数有关,所以我是用循环做的,但是我感觉我的做法不恰当,具体代码如下,这里有点不好表达,请高手就看代码吧

            <tr style="font-family:Arial;font-size:10px;">
                <td  id="lineDriver" runat="server" style="font-size:12px;color:#677ef5;background-color:#bad5ff; width:15%;font-weight:bold;">Driver</td>
                <td id="item_Driver" runat="server" style="color:#000000;background-color:#ffffff;text-align:left;" colspan="2">
                    <asp:Repeater ID="Repeater_driver" runat="server">
                    <ItemTemplate>
                       <table style="width:100%; border-bottom:1px solid #64b9f7;">
                           <tr style="border-left:none;border-right:none;">
                               <td style="width:80.2%;">Name: <%#Eval("name") %>.<br/>Version: <%#Eval("version") %>.</td>
                               <td style="border:none;">
                                   <div style="width:84px;height:21px;vertical-align:middle;margin:0 auto;">
                                       <asp:ImageButton ID="Install_Btn" runat="server" ImageUrl="image/settingButton.png" />
                                   </div>