6

I'm using Twitter Bootstrap, with ASP.Net MVC.

How can I right-align the text in the TextBoxFor:

@Html.TextBoxFor(model => model.PaymentReceived, 
new { @class = "pmtallocated pull-right" , .dir = "rtl" })

I get the error Invalid expression term '.' when trying above.

Thank you,

Mark

4

2 回答 2

9

尝试

new { @class = "pmtallocated pull-right" , @dir = "rtl" })
于 2013-09-25T13:42:26.800 回答
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"})
于 2013-09-25T15:23:31.187 回答