在aspx页面中有一个label
<asp:label id="lb001" runat="server" Text="显示内容&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;">
目的是想在显示这段文字的时候后面加几个空格(注意不是只加一个)。
但是加&nbsp;是不行的,请问各位应如何写呢?

解决方案 »

  1.   

     <asp:Label ID="lb001" runat="server" Text="显示内容" BorderColor="Blue" BorderStyle="Solid"
                ForeColor="Red" Style="border-left: 20px; border-right: 40px; width: 200px;"></asp:Label>你看下,我试过了,是可以的
      

  2.   

    <asp:label id="lb001" runat="server" Text="显示内容">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp</asp:Label> 
      

  3.   

    为这个控件设置一个宽度比较实际点,要不你就在它的后面写几个">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;也行,那样不管你的内容是多少都会在后面加上空格的
      

  4.   

    用其他控件可以放html标签的控件 Literal这个可以