Question: The two lines of code below work fine, but I want to combine them.
What I mean is: I want to use the @class in the first code line.
How can I do that?

```
<%: Html.TextBoxFor(model => model.Product.Price, String.Format("{0:f}", Model.Product.Price))%>

<%: Html.TextBoxFor(model => model.Product.Name, new { @class = "textBox150" })%>

```

thanks,

Filip

Answer: 
I know I'm way late here but I just found a solution to this issue:

```
<%: Html.TextBoxFor(model => model.StartDate, new { @class = "datepicker", Value=String.Format("{0:d}", Model.StartDate) })%>

```
Again, it may be late, but I believe that much better solution is to use [jquery.maskedinput](https://github.com/digitalBush/jquery.maskedinput) plugin (also available as a nuget package).

Why is it better to use a plugin than just an input format? Well, when someone modifies an input, you will loose formating, if you don't use a plugin.

[Here](http://digitalbush.com/projects/masked-input-plugin/) you can find a usage and a demo of how it works.