Solved

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

Posted on 2012-12-21
2
1,234 Views
Last Modified: 2012-12-24
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?
0
Comment
Question by:AlHal2
2 Comments
 
LVL 12

Accepted Solution

by:
HugoHiasl earned 250 total points
ID: 38712781
Dscd = Dscd.Replace(",","\r\n");
0
 

Author Closing Comment

by:AlHal2
ID: 38718277
Thanks.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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