Reputation: 237
I basically want the different labels to come on different lines.
protected void Button2_Click(object sender, EventArgs e)
{
Label2.Text = Label3.Text + Label1.Text;
}
I want the Label1.Text
to display on the line below Label3.Text
.
I do not want to tweak the width and height cause the Text in the labels won't be of the same width in every label.
Upvotes: 2
Views: 341
Reputation: 1896
A more elegant approach:
Label2.Text = Label3.Text + Environment.NewLine() + Label1.Text;
Upvotes: 0
Reputation: 17614
try using <br/>
in between it should work
Label2.Text = Label3.Text +"<br/>"+ Label1.Text;
Upvotes: 4