I am trying to add css class in existing razor dropdownList. Here is my code
var webHelper = EngineContext.Current.Resolve<IWebHelper>();
var currencies = Model.AvailableCurrencies.Select(x => new SelectListItem
{
Text = x.Name,
Value = webHelper.ModifyQueryString(Url.RouteUrl("ChangeCurrency", new { customercurrency = x.Id }), "returnurl=" + HttpUtility.UrlEncode(HttpContext.Current.Request.RawUrl), null),
Selected = x.Id.Equals(Model.CurrentCurrencyId)
});
@Html.DropDownList("customerCurrency", currencies, new { onchange = "setLocation(this.value);" })
I have to make the dropdown list a bootstrap dropdownlist like this...
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" data-hover="dropdown" href="#">USD
<i class="fa fa-angle-down pull-right"></i>
</a>
<ul class="dropdown-menu">
<li>
<a>USD</a>
</li>
<li>
<a>BDT</a>
</li>
<li>
<a>EU</a>
</li>
</ul>
</li>
What can i do?