maqskywalker
asked on
adding id tag to mvc dropdownlist
I'm using MVC 5 in a ASP.NET MVC application.
In my view I'm called my model like this at the beginning of the page.
@model Northwind.Models.EmployeeM odel
Then on my page I have a dropdown list that looks like this:
@Html.DropDownList("LastNa me")
When I run my page it works fine.
So here's my question.
When I use a html dropdownlist the typical tag looks like this:
<input id="DDLLastName" type="text" class="DDLLastNameStyle" />
How do i add id tag called the following id="DDLLastName" to my which mvc dropdownlist which currently looks like this?:
@Html.DropDownList("LastNa me")
In my view I'm called my model like this at the beginning of the page.
@model Northwind.Models.EmployeeM
Then on my page I have a dropdown list that looks like this:
@Html.DropDownList("LastNa
When I run my page it works fine.
So here's my question.
When I use a html dropdownlist the typical tag looks like this:
<input id="DDLLastName" type="text" class="DDLLastNameStyle" />
How do i add id tag called the following id="DDLLastName" to my which mvc dropdownlist which currently looks like this?:
@Html.DropDownList("LastNa
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.