I want to add some space before asp.net Label.I can't do this in .aspx ,I want this to be done in c#.How can I add space?? please help me.my label is placed like this:
Label Test
I want this to come to centre
Label Test
To add spaces to your label text from c#, you can pre-append many HTML non-breaking spaces by using
Example:
Label1.Text = " " + Label1.Text;
lblTest.Attributes.CssStyle.Add("margin-left", "<value>");
or
lblTest.Attributes.Add("class","<className>");
and specify the css style in the specified class.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With