1

我有一个gridviewhyperlink一列中,当用户单击链接时,他将被定向到另一个页面,其中将使用单独的标签显示特定行的详细信息。在那些labels标签中,对我来说必须是多行的,因为文本会太长......

请帮助我如何获得它。

标签的aspx页面

<asp:Label ID="LblDescription" runat="server" 
Font-Bold="True" Font-Names="Verdana" 
Font-Size="X-Small" ForeColor="#0061C1" Height="16px"
Width="97px" BorderColor="#0061C1" 
BorderWidth="1px" BackColor="White"></asp:Label>
4

1 回答 1

1

尝试这个....

<asp:Label ID="lblName" runat="server" Text="User1" Font-Bold="True" Font-Names="Verdana"></asp:Label>
<br />
<asp:Label ID="lblDescription" runat="server" Font-Bold="True" Font-Names="Verdana"
       Width="300px" Text="I got one gridview which has hyperlink in one column, when the user clicks the link he will be directed to another page where the details of particular row will be displayed using individual labels. In those labels one of the label must be multilined for me because the text will be too long">
</asp:Label>

设置标签的宽度属性,将使文本多行并且字体大小将保持不变,除非您为所有标签指定相同的字体名称

于 2013-07-03T11:32:30.427 回答