Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 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 May 4th, 2005, 09:17 AM
Registered User
 
Join Date: May 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kgriffin
Default Replace vbcrlf with <br> using C#

A common question I know :)

i am using
Code:
  string contents = e.Item.Cells[3].Text; //get text from datagrid

  contents = contents.Replace(vbCrLf,"<br> "); // replace linefeed with br
The compilation error is
Code:
CS0103: The name 'vbCrLf' does not exist in the class or namespace 'ASP.edithomepage_aspx'
which makes sense as it isn't declared anywhere, I cant find what headers to include to make it work.

any help is much appreciated

Cheers,
Kev
 
Old May 4th, 2005, 09:21 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Answer is in another recent thread.

http://p2p.wrox.com/topic.asp?TOPIC_ID=30062

-Peter
 
Old May 4th, 2005, 09:29 AM
Registered User
 
Join Date: May 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kgriffin
Default

Ah thankyou :) I search the forums for vbcrlf but didnt see that one :)

much appreciated

Cheers,
Kev





Similar Threads
Thread Thread Starter Forum Replies Last Post
text-align:justify; and <BR> anshul HTML Code Clinic 23 June 18th, 2018 03:04 AM
Replace "<enter>" with "<br>" Varg_88 Classic ASP Basics 5 February 14th, 2011 12:33 PM
<br/> becomes <br></br> Kabe XSLT 1 July 6th, 2007 07:42 AM
to append <br> in XSLT dharus XSLT 4 August 1st, 2006 09:52 AM
Breaks (<br>) in a title tag crmpicco HTML Code Clinic 6 June 3rd, 2005 06:34 AM





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