Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
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 30-Jan-13 2:20am
Comments
vivek511 at 30-Jan-13 7:46am
   
Hi Kindly upload you code that you developed, that will be helpful for us to solve your query.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

use Enviroment.Newline to make label appear with multiple lines
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
";
  Permalink  
v3
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

hi
you can use below code for Multiline in a lable

Label.AutoSize = true;
Label.Text = "Hello
"+"How are you?";
label.Text = value.Replace(Environment.NewLine, "
");
  Permalink  

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

  Print Answers RSS
0 Sascha Lefévre 485
1 Sergey Alexandrovich Kryukov 325
2 Maciej Los 255
3 Abhinav S 185
4 Peter Leow 110
0 Sergey Alexandrovich Kryukov 6,953
1 OriginalGriff 6,311
2 Maciej Los 2,732
3 Peter Leow 2,694
4 Abhinav S 2,652


Advertise | Privacy | Mobile
Web01 | 2.8.150414.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100