Wrox Programmer Forums
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics 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 November 12th, 2008, 11:57 AM
Friend of Wrox
 
Join Date: Jan 2006
Posts: 180
Thanks: 1
Thanked 1 Time in 1 Post
Send a message via ICQ to dpkbahuguna Send a message via MSN to dpkbahuguna Send a message via Yahoo to dpkbahuguna
Default HTML supported text filed.

Hello friends,

I've to show data in textbox but when i put the data into it, it is showing HTML tags also like <BR> I want a new line in place of <BR> tag.
can anyone help me here?


Thanks!!

DPK..
__________________
DPK..
 
Old November 12th, 2008, 04:31 PM
Friend of Wrox
 
Join Date: Jun 2008
Posts: 1,649
Thanks: 3
Thanked 141 Times in 140 Posts
Default

Bring up the page in your browser. Then click on the VIEW menu and then click on the SOURCE menu item.

What kind of HTML field is ASP.NET producing for that text box??

Unless I am much mistaken, it will be a <TEXTAREA>. And, yes, an HTML textarea ignores embedded HTML and just displays it as text.

What you could do is simply replace the HTML <br> tag with a vbNewLine character. But that won't solve all the other possible HTML tags: <b>, <p>, [u], and more.

You probably need to use one or more REGULAR EXPRESSIONS to do the replacements completely.

But here's a question: Do you NEED to allow the user to EDIT this data??? If not, simply do *NOT* put it into a textbox! Just put it into a LABEL, instead. Voila, it should work.





Similar Threads
Thread Thread Starter Forum Replies Last Post
boolean filed in crystal report saeed_sp BOOK: Professional Crystal Reports for VS.NET 0 August 2nd, 2008 11:58 PM
Text To HTML sumith ASP.NET 2.0 Basics 1 October 25th, 2007 02:26 AM
Gridview - Place cursor inside filed Sindbad Visual Studio 2005 0 September 21st, 2007 09:24 AM
[Q] How do you dynamically reference the filed in CyanBlue C# 6 September 2nd, 2006 11:24 AM
Ch3, P.76 - text.html/text.php not working Hostile BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 4 May 15th, 2004 11:09 AM





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