如何在直放站中制作垂直线 [英] How to make vertical line in repeater

查看:95
本文介绍了如何在直放站中制作垂直线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用中继器.我在其中使用用户,问题,问题主题和语言.我想在框内覆盖用户,然后会有问题.之后将只有一条垂直线.如何创建框线和垂直线.我的代码在这里.

I am using a repeater. In which i am having a user, question, question subject and language. I want to cover user in the box then there will be question. after that there will be a single vertical line. How can i create box and vertical line. My code is here.

<asp:Repeater ID="Repeater1" runat="server">
 <ItemTemplate>
<font color="red"><u><i> <%# DataBinder.Eval(Container.DataItem,
               "Question", "{0: d}") %></i></font></u>
           &nbsp;&nbsp;&nbsp;
           <%# DataBinder.Eval(Container.DataItem,
               "Sub", "{0: d}") %>
                Question Asked by: <b><%# DataBinder.Eval(Container.DataItem, "Asker") %></b>
       <br> <%# DataBinder.Eval(Container.DataItem,
      "Lang", "{0: d}")%>
              </ItemTemplate>

推荐答案

将所需的控件放在div内,并使用CSS对其施加边框.

您还应该使用CSS而不是字体u和i元素.这将使您的代码更具可维护性和可扩展性
Place the controls you want inside a div and use CSS to apply a border to it.

You should also use CSS rather than the font, u and i elements. This will make your code more maintainable and extensible


这篇关于如何在直放站中制作垂直线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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