Link to home
Start Free TrialLog in
Avatar of AlHal2
AlHal2Flag 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?
ASKER CERTIFIED SOLUTION
Avatar of HugoHiasl
HugoHiasl

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AlHal2

ASKER

Thanks.