asp.net - How to add a new line in a textbox's text? -


i have asp.net textbox control. it's multiline property set true, making html textarea element.

the text of textbox set as,

text="new\r\nline\r\nrequired" 

as can guess, trying display words in text in separate lines. however, text displayed entered. doing wrong? please help.

try this

textbox1.text.replace(environment.newline, "<br />") 

Comments

Popular posts from this blog

matlab - How to equate a structure array to structure array -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -