Bootstrap class does not work with htmlhelper

1

I'm now starting to work with MVC, Razor, Bootstrap etc., and I'm having a design problem.

These 2 textarea are using the same classes, everything is the same, except that in one I load value from my model , so I have to use html helper, and the bottom is only html pure.

        <div class="form-group">          
            <div class="col-lg-10">
                @Html.TextAreaFor(model => model.Definicao, 5, 45, new { htmlAttributes = new { @class = "form-control" } })            
            </div>
        </div>

        <div class="form-group">         
            <div class="col-lg-10">
                <textarea class="form-control" name="model.Definicao" rows="5" cols="45" ></textarea> 
            </div>
        </div> 

    
asked by anonymous 06.05.2017 / 06:22

1 answer

1

Try the following:

@Html.TextAreaFor(model => model.Definicao, new { @class = "form-control",  rows="20", @cols="50" })
    
06.05.2017 / 06:55