How to add css class in different control

Jak
Jak
Member
364 Points
152 Posts

How to add class in different control

Views: 8171
Total Answered: 1
Total Marked As Answer: 0
Posted On: 22-Feb-2015 13:45

Share:   fb twitter linkedin
Answers
Rahul Maurya
Rahul M...
Moderator
1172 Points
211 Posts
         

textbox:

@Html.TextBoxFor(m => m.Name, new { data_bind="value: Name", @class = "title width-7" })

dropdrown:

@Html.DropDownList("PriorityID", (IEnumerable<SelectListItem>)ViewBag.PriorityID, new { @class="dropdown" })
@Html.DropDownListFor(x => x.PriorityID, (IEnumerable<SelectListItem>)ViewBag.PriorityID, new { @class = "dropdown" })
Posted On: 22-Feb-2015 13:53
 Log In to Chat