Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2012-12-21
2
Medium Priority
?
1,483 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

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

Author Closing Comment

by:AlHal2
ID: 38718277
Thanks.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

730 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