You can use Htmlattributes from the Asp.net MVC Htmlhelper itself.
You can just put a style
, setting the width
to the desired size:
@Html.TextBoxFor(model => model.strTituloEmail, new { @class = "form-control form-control-custom", @style="width:1000px;"})
Result in HTML:
<input class="form-control form-control-custom" id="strTituloEmail" name="strTituloEmail" style="width:1000px;" type="text" value="">
Or creating a class
customized to your desired style, for example:
<style>
.form-control-custom {
width: 1000px;
}
</style>
And then use your class
customized addition to class
bootstrap. (Just don’t forget that your style should always be loaded later than bootstrap, to overwrite it)
@Html.TextBoxFor(model => model.strTituloEmail, new { @class = "form-control form-control-custom"})
Result in HTML:
<input class="form-control form-control-custom" id="strTituloEmail" name="strTituloEmail" type="text" value="">
Use the CSS hierarchy to your advantage, remember what the acronym means CSS (Cascading Style Sheets), use the C.
Diego, try to do this: @Html.Textboxfor(model => model.strTituloEmail, new { @class = "form-control input-lg" }). This way bootstrap recognizes the class to be used and applies to the element. This is what you wanted ?
– Érik Thiago