Click here to Skip to main content
15,885,782 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
See more:
Sir,
I have taken text box and set the multiline line property true.
this data is inserted into database table.
Then this data is bind to label.This lable in the repeator control.
I want to display data in label line by line .
For eg.
Enter this data in multiline text box like .
1)What is your name?
2)What is your College name?

I want to display same in label also. as per above .

Please Sir ,Give me the solution for this problem.
Posted
Comments
[no name] 30-Jan-13 7:46am    
Hi Kindly upload you code that you developed, that will be helpful for us to solve your query.

use Enviroment.Newline to make label appear with multiple lines
 
Share this answer
 
Give some fixed Width and height to ur label for example,

< asp:Label ID="lblname" runat="server" Text="Name" Width="200px" Height="100px"/>

or use
like

Label1.Text = "aaaa
bbbb
cccc
";
 
Share this answer
 
v3
hi
you can use below code for Multiline in a lable

Label.AutoSize = true;
Label.Text = "Hello<br />"+"How are you?";
label.Text = value.Replace(Environment.NewLine, "<br />");
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900