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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:45:51+00:00 2026-05-24T01:45:51+00:00

I have a textbox that the user can input into. Right now the user

  • 0

I have a textbox that the user can input into. Right now the user can enter in anything, but I would like to limit the user.

  • I first need to only allow numbers from the user that are negative or positive, and/or decimal (up to 3 digits).

In the RichTextBox the data looks like this:

227.905
227.905
242.210
-236.135
5.610
29.665
269.665

SO, what I am trying to do is add the string value from the TextBox to each one of these lines in the RichTextBox.

EXAMPLE:
If the user entered in “25.305” into the TextBox it would add that value to each one of the values in the RichTextBox and then replacing that value in the RichTextBox with the new value making the updated RichTextBox look like this:

253.210
253.210
267.515
-210.830
30.915
54.970
294.970
  • Does anyone know how to do this?
  • 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-24T01:45:51+00:00Added an answer on May 24, 2026 at 1:45 am

    Try this

     string[] Values = richTextBox1.Text.Split(new char[]{'\r','\n'});
                richTextBox1.Clear();
                foreach (string Value in Values)
                {
                    richTextBox1.Text += (Convert.ToDouble(Value) + Convert.ToDouble(textBox1.Text))+"\r\n";
    
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a textbox that I would like for only numbers. But if I
Does asp.net have a built in mechanism that can sanitize all textbox input instead
I have an input that I'd like to put a placeholder text in, but
I need to have a textbox (sort of) where the user can enter text
Let's say we have a textbox that's readonly, like so: <input type=text readonly />
I want to have a text box that the user can type in that
I have a user that want to be able to select a textbox and
I have a user control that is pretty basic. It contains several TextBox controls,
I have an ASP.Net web user control that contains a TextBox and a calendar
I have a composite drop down calendar user control that consists of a textbox

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.