Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Printer Friendly Page

Reply
Thread Tools

Printer Friendly Page

 
 
=?Utf-8?B?SmltIEg=?=
Guest
Posts: n/a
 
      06-30-2005
I am "printing" data in a label control that was entered via a multi-line
textbox control. The CRLF are not appearing correctly. Any suggestions?

Thanks !
 
Reply With Quote
 
 
 
 
souri challa
Guest
Posts: n/a
 
      07-01-2005
Replace the new line character in the text with a HTML tag. Some thing
like
Label1.Text = TextBox1.Text.Replace("\n","<br>")
HTH,
-Souri

 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      07-01-2005
Have you tried using System.Environment.NewLine ?



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Espańol
Ven, y hablemos de ASP.NET...
======================

"Jim H" <Jim http://www.velocityreviews.com/forums/(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am "printing" data in a label control that was entered via a multi-line
> textbox control. The CRLF are not appearing correctly. Any suggestions?
>
> Thanks !



 
Reply With Quote
 
Srim
Guest
Posts: n/a
 
      07-01-2005

Try
this

Replace with
str = str.Replace("\r\n","<BR/>")


lblDescription.Text=Server.HtmlDecode(str);

I think it will work

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hotwired Printer Friendly Page Beavis ASP .Net 1 12-13-2006 04:25 PM
How to make a Printer friendly page in ASP.Net Yog ASP .Net 0 03-27-2006 02:25 PM
Please help - how to create a Printer Friendly web page... =?Utf-8?B?VGlnZ2Vy?= ASP .Net 2 11-10-2004 01:15 PM
Help please: Creating a printer friendly page from a form tommy Javascript 2 10-10-2003 08:04 PM
implementing a Printer Friendly .aspx Page John Klucker ASP .Net 1 08-15-2003 10:54 PM



Advertisments