无法在数据列表中设置多行的标签 [英] Unable to set a label with multiple lines inside a datalist

查看:70
本文介绍了无法在数据列表中设置多行的标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在datalist中的datacolumndescriptionstatic中显示值。我在dtatalist中将repeatcolumn设置为3。数据列的长度为200 varchar。数据被检索并显示在数据列表中但我的问题是显示的数据作为单行运行并与数据列表的下一列重叠。如何以多行显示它,以便它不会与datalist的下一列重叠。



 <   tr  >  
< td >
< p align = left style = font-family:Verdana; font-size:smaller; font-weight:normal; >
关于商品:
< asp:标签 ID = Label11 runat = server 宽度 = 55 高度 = 80

文字 =' <%#DataBinder.Eval(Container.DataItem, DescriptionStatic%> ' >
< / asp:标签 >
< / b >
< / p >
< / td >
< / tr >

解决方案

hi
尝试增加标签的宽度并尝试,同时增加datalist coloumn的宽度



 < span class =code-keyword><   asp:label     id   =  Label11    runat   =  server     width   = < span class =code-keyword> 400    height   =  80    xmlns:asp   = #unknown >  
Text ='<%#DataBinder.Eval(Container。 DataItem, DescriptionStatic)%>'> < / asp:label >


尝试使用< br />在你的文本中进行换行


I want to show the value in datacolumn 'descriptionstatic' in datalist. I have set repeatcolumn to 3 in the dtatalist. The length of datacolumn is 200 varchar. The data is retrieved and shown in the datalist but my problem is that the data shown runs as a single line and overlaps the next column of the datalist. How to show it in multiple lines, so that it will not overlap the next column of the datalist.

<tr>
   <td >
   <p align="left"  style=" font-family:Verdana; font-size:smaller; font-weight:normal;">
   About the product:
   <asp:Label ID="Label11" runat = "server"  Width="55" Height="80"

   Text=' <%# DataBinder.Eval(Container.DataItem, "DescriptionStatic")%>'>
   </asp:Label>
   </b>
   </p>
   </td>
   </tr>

解决方案

hi try to increase width of label and try,and also increase width of datalist coloumn

<asp:label id="Label11" runat="server" width="400" height="80" xmlns:asp="#unknown">
   Text=' <%# DataBinder.Eval(Container.DataItem, "DescriptionStatic")%>'></asp:label>


try to use "<br />" inside your text for line break


这篇关于无法在数据列表中设置多行的标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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