|
-
May 27th, 2002, 11:20 AM
#1
Thread Starter
New Member
Labels can't multiline... what's the deal?
Apparently, the Web Forms Label Control can't recognize a carriage return / line feed and handle it properly... am I going to have to seek out a third party control for this? If so, any recommendations?
-
May 27th, 2002, 06:34 PM
#2
Fanatic Member
Re: Labels can't multiline... what's the deal?
Originally posted by kcornell
Apparently, the Web Forms Label Control can't recognize a carriage return / line feed and handle it properly... am I going to have to seek out a third party control for this? If so, any recommendations?
Labels can handle multi-lines but a web form requires HTML. Replace the vbCrLf with <br> and your all set.
John
-
May 27th, 2002, 09:28 PM
#3
Thread Starter
New Member
Thanks for the info (new to ASP here). What I was doing was changing a label's text to a textbox's text when a button was pushed, I just used a run-of-the-mill ReplaceString function to find all the vbCrLf's and put in "<br>"s and it worked like a charm.
-
May 28th, 2002, 07:35 AM
#4
Fanatic Member
Glad it worked.
You can also use the built-in Replace function/method. All Strings have it by default.
MyLabel.Text = MyTextBox.Text.Replace(vbCrLf,"<br>")
- or -
MyTextBox.Text = MyLabel.Text.Replace("<br>",vbCrLf)
John
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|