Custom attributes defined on a WebControl's tag would be outputted as-is if
they are not recognized to match any typed property. Although, TextBox does
have Style property, inherited from WebControl and in this case iterating
through TextBox's Style property's keys would show text-align is there if
you specify it declaratively
<asp:TextBox ID="TextBox1" runat="server" style="text-align:right" />
foreach (string key in TextBox1.Style.Keys)
{
//Output the keys
}
--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke http://teemukeiski.net
"Bjorn Sagbakken" <bj*****@online.nowrote in message
news:uf*********************@telenor.com...
"Mark Rae" <ma**@markNOSPAMrae.netwrote in message
news:O6**************@TK2MSFTNGP05.phx.gbl...
>"Bjorn Sagbakken" <bj*****@online.nowrote in message
news:T8*********************@telenor.com...
>>Is there a way to right align the text in a textbox?
<asp:TextBox ID="MyTextBox" runat="server" style="text-align:right;" />
Thanks. That worked.
I was looking for something like that but didn't find anything browsing
the properties of the textbox, not even style.
Bjorn