Avatar of AlHal2
AlHal2
Flag for United Kingdom of Great Britain and Northern Ireland asked on

replacing comma with carriage return line feed in asp.net 3.5 C#

I have a string dscd.  In VB 2005 (windows form)  this command works OK.
        Dscd = Replace(Dscd, chr(44), Chr(13) & Chr(10))

I'm trying to convert this program to be web based using C# for asp.net 3.5

This command fails (also fails if I use + instead of &)

                    Dscd = Dscd.Replace((Char)44, (Char)13 & (Char)10);

The error message is:
The best overloaded method match for 'string.Replace(char, char)' has some invalid arguments

What would work better?
ASP.NET

Avatar of undefined
Last Comment
AlHal2

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
HugoHiasl

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
AlHal2

ASKER
Thanks.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy