Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7988189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T12:21:54+00:00 2026-06-04T12:21:54+00:00

I have a messaging system that is a .NET 2 ASMX web service, very

  • 0

I have a messaging system that is a .NET 2 ASMX web service, very basic system. I push messages and would like to have newline symbols in the message so it’s formatted on the receiving end. For example, I’d like to send a string such as: “Hello\n\nMy Name Is…” and have it have two line breaks. When the receiver reads the text it’s actually outputting the \n’s in the text. How can I get the \n’s to be interpreted as if I was writing it in C#? Or \t etc.

Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T12:21:56+00:00Added an answer on June 4, 2026 at 12:21 pm

    You should compose the message using Environment.NewLine to insert the character(s) used to represent a newline on your system.

    See here for references

    However using Environment.NewLine has some problems.
    For example, your message should be written in this way

    string msg = "Hello" + Environment.NewLine + Environment.NewLine + "My Name Is...";
    

    a bit cumbersome to use from a programmer point of view.

    Then you could write an extension method for the string class which takes your message and insert at the place of a placeholder the Environment.NewLine chars.

    This example use the | (pipe) character as placeholder for the newline pos.

    public static string InsertLineBreaks(this string inMsg)
    {
        Strinbuilder sb = new StringBuilder(inMsg);
        sb.Replace("|", Environment.NewLine);
        return sb.ToString();
    }
    

    and you can call this extension in this way

    string msg = "Hello||My Name Is...".InsertLineBreaks();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a private messaging system and would like to have about 4-5 links
I'm designing a C#/NHibernate website that features a private messaging system. I would like
I have a C# app that subscribes to a topic on our messaging system
I have a basic messaging system set up and I m using the same
I have make a messaging system in which user can send messages to each
On a messaging system, line breaks have been added automatically when messages are posted
I'm building a small messaging system like you have in facebook. Only thing is
I'm designing a messaging system that will have to support a huge amount of
I'd like to have a dynamic messaging system in my C++ project, one where
I have created a WCF web service that connects to an XMPP service with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.