在datalist的两行表之间的Vartical线 [英] Vartical line between two row of table in datalist

查看:68
本文介绍了在datalist的两行表之间的Vartical线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

先生。我有一个数据列表,其中我是两排。在第一行,我显示主题名称,在第二行显示作业。它的外观如下:



sir. i have a datalist in which i am two row. In first row i am showing subject name and in second row showing homework. And its look like:

English
  Learn chapter-1
Hindi
  Learn poem of chapter-10





现在,我想显示连接所有主题的vartical线,它们看起来像:





now,i want to show a vartical line to connect all the subject and they look like:

English
 | Learn chapter-1
 | 
Hindi
  Learn poem of chapter-10





我该怎么办呢。我的datalist代码是:







how can i do it. my datalist code is:


<asp:DataList ID="lvTweets" runat="server">
                        <ItemTemplate>
                            <table border="0" cellpadding="0" cellspacing="0" width="95%" align="center">
                                <tr>
                                    <td align="center">
                                        <table width="100%">
                                            <tr>
                                                <td style="height:25px">
                                                    <asp:Label ID="LblNewsID" runat="server" Visible="false" Font-Bold="false" Text='<%#Eval("HomeworkID") %>'></asp:Label>
                                                  <span class = "label label-info">  
                                                  <asp:Label ID="Label2" runat="server" Font-Bold="false" Text='<%#Eval("Subject") %>'></asp:Label>
                                                  </span>
                                                </td>
                                            </tr>
                                            </table>
                                            
                                            <table width="90%">
                                            <tr>
                                                <td>
                                                <p style="background-color:#E0AC2A; color:White"  class="rounded_corners"> <asp:Label ID="Label1" runat="server" Width="100%" Font-Bold="false" Text='<%#Eval("Homework") %>'></asp:Label></p> 
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                            <br />
                        </ItemTemplate>
                        <FooterTemplate>
                            <asp:Label ID="Mensaje" runat="server" Visible="false" Text="Homework not updated">
                            </asp:Label>
                        </FooterTemplate>
                    </asp:DataList>





我的尝试:


$ b $在Google搜索bi,但我没有得到任何解决方案。我不知道怎么办。



What I have tried:

i search on google but i did not get any solution of it. and i have no idea how can i do it.

推荐答案

试试



try

<table border="0" cellpadding="0" cellspacing="0" width="95%" align="center">
                  <tr>
                      <td align="center">
                          <table width="100%">
                              <tr>
                                  <td colspan="2" style="height: 25px">
                                      <asp:Label ID="LblNewsID" runat="server" Visible="false" Font-Bold="false" Text='<%#Eval("HomeworkID") %>'></asp:Label>
                                      <asp:Label ID="Label2" runat="server" Font-Bold="false" Text='<%#Eval("Subject") %>'></asp:Label>

                                  </td>
                              </tr>
                              <tr>
                                  <td style="padding-left:20px; ">
                                      <div style="border-left:2px solid black;">
                                          <span style="padding-left:5px;">
                                      <asp:Label ID="Label1" runat="server" Width="100%"  Text='<%#Eval("Homework") %>'></asp:Label>
                                              </span>
                                          </div>
                                  </td>
                              </tr>
                          </table>


                      </td>
                  </tr>
              </table>


这篇关于在datalist的两行表之间的Vartical线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆