amoran
asked on
Assigning multiline to label
Hi
I’m fairly new to ASP.NET, I’m using 2.0.
I am trying to develop a page where the user can enter text into a multi line textbox and then when they click enter the text is stored in a Table in an SQLServer DB.
When the page is reloaded the text that was stored is outputted to a Label.
This works ok except for one small problem when I enter text in the text box which is more than one line IE
"Hello
my
name
is
Graham"
It is displayed in the Label as "Hello my name is Graham"
Does anyone know how to keep the text in the form that it was entered in the textbox when it is displayed in the Label?
Other wise I will not be able to have paragraphs etc, just one long string.
Thanks
I’m fairly new to ASP.NET, I’m using 2.0.
I am trying to develop a page where the user can enter text into a multi line textbox and then when they click enter the text is stored in a Table in an SQLServer DB.
When the page is reloaded the text that was stored is outputted to a Label.
This works ok except for one small problem when I enter text in the text box which is more than one line IE
"Hello
my
name
is
Graham"
It is displayed in the Label as "Hello my name is Graham"
Does anyone know how to keep the text in the form that it was entered in the textbox when it is displayed in the Label?
Other wise I will not be able to have paragraphs etc, just one long string.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
and then append at the bottom.
so if u r lable has width = 50px
then "Hello my name is Graham"
will look like
"Hello my name
is Graham"
Rugved