ASP.NET MVC Bootstrap Form Helper

324 Views Asked by At

Hello I use country select from bootstrap form helper but how I can bind this with model? Normally I use

@Html.TextAreaFor(m => m.Attribute, new { @class = "form-control col-md-2", required = "required" })

But here I have only div and I want pass data from select country list to model but dont know how. Anyone can help me?

                <div class="bfh-selectbox bfh-countries col-md-3" data-country="US" data-flags="true" ></div>
1

There are 1 best solutions below

0
hekta On BEST ANSWER

Try data-name/name attribute like:

<div class="bfh-selectbox bfh-countries col-md-3" data-name="Attribute" data-country="US" data-flags="true" ></div>