Line wrap - WebForm Label

  • Thread starter Thread starter Guest
  • Start date Start date
As far as I'm aware, if you specify a width for the label, the text wraps
by default.

Andy Mortimer [MS]
Please do not send email directly to this alias. This alias is for
newsgroup purposes only

This posting is provided "AS IS" with no warranties, and confers no rights.
OR if you wish to include a script sample in your post please add "Use of
included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm"
 
I set the width but do not get line wrapping (see below). Can you see what I'm doing wrong?

WebFprm1.aspx

<asp:Label
id="Label2"
style="Z-INDEX: 101; LEFT: 40px; POSITION: absolute; TOP: 48px"
runat="server" Width="184px" Height="64px"></asp:Label>



WebForm1.aspx.cs

Label2.Text = "MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM";
 
Perhaps I'm missing something here. Wordwrap is exactly that, it wraps
words. If you put in one great big long word it can hardly wrap it?

If you break up your sentence into words can you see it wrapping?

Andy Mortimer [MS]
Please do not send email directly to this alias. This alias is for
newsgroup purposes only

This posting is provided "AS IS" with no warranties, and confers no rights.
OR if you wish to include a script sample in your post please add "Use of
included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm"
 
Back
Top