Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 23rd, 2005, 05:41 AM
Authorized User
 
Join Date: May 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default function for Escape characters

Is there any function(other than replace) which converts the text escape character like line feed or tab feed to there corresponding html escape character like &nbsp or <br />.
I want touse it in asp.net page label control to view the data user had entered through multiline textbox.(C#)


 
Old May 23rd, 2005, 07:30 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Nope. There is the HtmlEncode method on the server class, but this is only for encoding characters that would break HTML ( < > & etc). There is nothing illegal about a tab or linefeed character. If that data has some meaning to you (as you indicate it does because you wish to replace it with HTML representations) then you'll have to replace them manually.

-Peter





Similar Threads
Thread Thread Starter Forum Replies Last Post
Escape ' lafilip XSLT 3 May 22nd, 2007 03:31 AM
SQL vs ASP.NET..escape characters haunting Quick209 ASP.NET 2.0 Basics 0 May 17th, 2006 03:26 PM
XML escape characters ACE2084 XML 0 September 9th, 2005 03:12 PM
how to escape special characters? reddygaru XML 2 December 16th, 2003 07:13 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.