Avatar of zachvaldez
zachvaldez
Flag for United States of America asked on

Textbox multiline property

I have a textbox that has multiline property set.
I output my data here from another page.

When it loads Id like the textbox to treat the new data as a new line not a continuation text or append.
Each new data entered should start with
*

on my page load event, I have this code..

If dr("CommentsHist") is system.dbnull.value = false then
   textBox1.text = dr("CaommentsHist")
endif

Currently since textbox1 has mulitiline, each new data entered just appends it to previous data.

I prefer new line created everytime.
ASP.NETJavaScriptVisual Basic.NET

Avatar of undefined
Last Comment
zachvaldez

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Element1910

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Element1910

I think you made a typo on your original question, but I left it as you wrote it, just in case ;)
Element1910

You could also append the Environment.Newline to the data coming from the other webpage.
zachvaldez

ASKER
You could also append the Environment.Newline to the data coming from the other webpage--

show me how to please?

BTW the + Environment .newline adds as "," before the data such as example

,Testing8
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
SOLUTION
Element1910

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Nasir Razzaq

Looks like the data is coming from SQL. In SQL you can use following to add new line to end of string

Select Col1, Col2, Col3 + Char(10) + Char(13) As Col3 From ...
Element1910

Well, it looked like the data was coming from a DataTable from another page and put into a session variable or querystring to pass to this page. So that's why I mentioned tacking on the Environment.Newline to the variable or querystring that was being passed in.
zachvaldez

ASKER
2 issues,
1.when I do the Add it adds the textbox but retains the information that loads on page_load event.
Is it possible that when it adds a new textbox , it is blank.

2. when I start to type with a number say 1992,1998 , there is is no ","
at the start of line however when I type text, it adds the "," in a new line though...
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
zachvaldez

ASKER
the comments helped in finding a solution.