473,320 Members | 2,020 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Printer Friendly Page

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 !
Nov 19 '05 #1
3 1005
Replace the new line character in the text with a HTML tag. Some thing
like
Label1.Text = TextBox1.Text.Replace("\n","<br>")
HTH,
-Souri

Nov 19 '05 #2
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 H@discussions.microsoft.com> wrote in message
news:25**********************************@microsof t.com...
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 !

Nov 19 '05 #3

Try
this

Replace with
str = str.Replace("\r\n","<BR/>")
lblDescription.Text=Server.HtmlDecode(str);

I think it will work

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: ST | last post by:
Hi, I'm implementing a printer friendly feature for all the pages on a web site. I'm separating the header, content, and footer into separate ascx files, which are contained in the main file. ...
1
by: John Klucker | last post by:
Can anyone tell what easiest way to implement 'Printer Friendly' functionality to my .aspx page. Are there any controls available or is there something in the framework? Thanks in Advance!! ...
2
by: Ray | last post by:
ASP.NET Newbie ? I have a populated datagrid on my .aspx page, I want to open a second window without all the extra fluff (nav bar, menus, etc) and display a printer friendly version of my...
2
by: Ron | last post by:
Hello, I am working on a registration application for my companies intranet. The intranet is ASP classic based as of now. Unfortunately I only know ASP.NET. But that was all okay until I decided I...
2
by: Sandy | last post by:
Hello - I tried to google this, but got back every page on the whole entire web that has printer friendly versions . . . I have a panel containing text from a repeater that also contains text...
1
by: dinoo | last post by:
Can any one help me out? I am looking out to implement printer friendly version of a web page. I do not want the header and footer show up in the print and I do not want to use frames (it is a...
2
by: weetat.yeo | last post by:
Hi all , I have a print button in PHP page which using javascript window.print() to print web page. However , when user click "print" , the print preview display that the page cut-off and...
5
by: weetat.yeo | last post by:
Hi all , I have php page which the data in the page are extracted from MYSQL database. The data are retrieved when user click submit button . In the php page , there is a print button for user...
1
by: tbanov | last post by:
Hi, I'm looking to create my own version of a printer-friendly page. Any resources I can find on this subject are extremely specific about what they consider "printer-friendly", and they don't...
15
by: Prisoner at War | last post by:
Okay, I'd like to create a print-friendly website, so I've been reading up on how to create print-friendly pages (without duplicating my site, of course, by having separate versions of each...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.