我正在使用Twitter Bootstrap和ASP.Net MVC。
如何右键对齐TextBoxFor中的文本:
@Html.TextBoxFor(model => model.PaymentReceived,
new { @class = "pmtallocated pull-right" , .dir = "rtl" })
我在上面尝试时收到错误Invalid expression term '.'
。
谢谢,
标记
答案 0 :(得分:8)
试
new { @class = "pmtallocated pull-right" , @dir = "rtl" })
答案 1 :(得分:6)
尝试任何
@Html.TextBoxFor(model => model.PaymentReceived,
new { @class = "pmtallocated pull-right" , @dir = "rtl" })
或
@Html.TextBoxFor(model => model.PaymentReceived,
new { @class = "pmtallocated pull-right" , @style="text-align:right"})