1) Make sure the asp:label has a fixed width. This way aligning to the right is actually meaningful.
2) In your page_load or other relevant code section insert a piece of code similar to the following:
Label1.Style.Add("text-align", "right");
note that this can also be accessed like so:
Label1.Attributes.CssStyle.Add("text-align", "right");
The attributes element is also worth exploring for your own research, it can provide an enumerator for all keys associated with the current control.
No comments:
Post a Comment