Solved

Replace("<br/>", chr(10) Give Error 'chr' does not exist in the current context but works with two strings.

Posted on 2010-09-04
1
912 Views
Last Modified: 2013-12-17
This answer I found here, but it seem to work for some and not for others,  am I missing some maybe a directive of something?

the code works if i use strings only but if i try to use the the chr(10)

string j = s.Replace("<br/>", chr(10));

I get error:
The name 'chr' does not exist in the current context


Thanks for any help!
0
Comment
Question by:bmanmike39
1 Comment
 
LVL 85

Accepted Solution

by:
Mike Tomlinson earned 500 total points
ID: 33605480
Chr() is a legacy VB function so it will work in VB.Net apps...
You should be able to use the newline escape sequence of "\n":
    string j = s.Replace("<br/>", "\n");
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now