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

  • Home
  • SEARCH
  • 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 9198605
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:19:29+00:00 2026-06-17T22:19:29+00:00

Currently in my application I have a string that is read in from an

  • 0

Currently in my application I have a string that is read in from an XML file however the whole string is concatenated together and I want to be able to split up the string over multiple lines of the ‘RichTextBox’ at specific points that I choose in the XML node for that string.

For example my string before formatting as it sits in the XML node:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus
eleifend arcu vel tellus aliquam eget aliquet orci dignissim. Integer
volutpat congue elementum. In commodo porta sem. Phasellus commodo
consectetur hendrerit. Integer bibendum consequat elit nec ultricies.
Fusce facilisis elit in justo facilisis sagittis. Aenean eget risus
placerat dui hendrerit pharetra sed in neque. Maecenas vehicula
iaculis lectus eget scelerisque. Fusce sed consequat elit.

The result I desire after formatting in my application:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eleifend arcu vel tellus aliquam eget aliquet orci dignissim. Integer volutpat congue elementum. In commodo porta sem.

Phasellus commodo consectetur hendrerit. Integer bibendum consequat
elit nec ultricies. Fusce facilisis elit in justo facilisis sagittis.

Aenean eget risus placerat dui hendrerit pharetra sed in neque.
Maecenas vehicula iaculis lectus eget scelerisque. Fusce sed consequat
elit.

Is it possible to split up one long concatenated string over multiple lines like this for a ‘RichTextBox’ by including the formatting directly within the XML node / string itself rather than hard coding where each new line needs to be?

  • 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-17T22:19:31+00:00Added an answer on June 17, 2026 at 10:19 pm

    I ended up finding my own solution to this problem; it’s similar to what has been said but instead what this does is check for a specific character in the string and then remove it and in its place puts in a new line.

    myLongString = myLongString.Replace("@", "" + System.Environment.NewLine);
    

    The example above simply checks the string for the @ symbol and then removes it and adds a new line. This then allows the string to be formatted with a new line wherever the specified keyword or symbol appears which means that the formatting of the string can be stored with the XML node and then interpreted.

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

Sidebar

Related Questions

Currently i have an application that reads and writes several properties from one or
helo, i want to read values from this file: http://www.nbp.pl/kursy/xml/lastC.xml and fill grid with
I currently have a database that gets updated from a legacy application. I'd like
I currently have an application I'm writing in c# (using .NET) that requires me
We currently have an application that depends largely on stored procedures. There is a
I currently have an application that uses a browserfield to access an internet page
I have an application that currently links to Google Maps passing it the required
I'm currently writing a web application that have about 6-12 pages. On each one
Suppose this is a configuration data object that I read from DB/XML: class ConfigurationClass{
I have an application that reads from a COM Port and then does something

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.