Hi
I have applied the following code to implement asp.net mvc dropdownlist
and It is working as expected.
--------------------------------------------------------------------
ViewBag.DepotID = new SelectList(TSDataBase.Depot, "DepotID", "DepotName", 2);
-----------------------------------------------------------------------
@Html.DropDownList("DepotID", "All")
------------------------------------------------------------------
But I need to add some css and javascrip to the dropdown.
I was trying as follows.
@Html.DropDownList("DepotID", "All", new { style = "width: 50px; border:1px solid #7D7D7D; border-radius:5px;", onchange = "this.form.submit();" })
But here it is showing error (ie. red uderline is appearing)
I could not get any solution for this from google also.
Can any give solution for this?