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 7497157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T18:57:30+00:00 2026-05-29T18:57:30+00:00

Im working on a bulk email sending app and have a page with a

  • 0

Im working on a bulk email sending app and have a page with a multiline textbox which I am wanting to use as a way of allowing a user to enter the email body text.

I need to format the text within my textbox to HTML, most importantly I need to format linebreaks to HTML, however I cant seem to do this.

The method everyone seems to say to use is:

textOut.Replace("\r\n", "<br />")

But this just does nothing. My Textbox looks like this:

   <asp:TextBox runat="server" 
                            ID="txtMailBody" 
                            TextMode="MultiLine" 
                            Width="650" 
                            Height="150"/>

When I enter text in the textbox such as:

Line 1

Line 2
Line 3

It always outputs like

Line 1 Line 2 Line 3

Am I doing something wrong here?

  • 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-05-29T18:57:31+00:00Added an answer on May 29, 2026 at 6:57 pm

    Try this

    txtMailBody.Text.Replace(Environment.NewLine, "<br />")
    

    Hope it helps

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am working in codeigniter. I have mistakenly sending a bulk of email while
I'm trying to create a bulk edit page for an app that I'm working
I'm working on an app which encodes text to QR codes. Currently I have
I have a query which is working fine: BULK INSERT ZIPCodes FROM 'e:\5-digit Commercial.csv'
I am working on an excel bulk upload feature which has to be parsed
Am working on an application which has a requirement to download bulk data from
I was working on a project and there is bulk e-mail sending part of
I'm new to PL/SQL and I'm working on writing a bulk insert. I have
Actually i have created following procedure,which is working fine. CREATE or REPLACE PROCEDURE GET_NOS(
I have a very basic CSV file upload module working to bulk upload my

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.