Change Label On Change Dropdownlistfor Value
I use a DropDownListFor and a label text on my page. <%=Html.DropDownListFor(x => x.MotiveClientType, new SelectList( Mode
Solution 1:
I'm not aware of any functionality native to ASP.NET MVC that will allow you to do this, but doing it with jQuery is a fairly trivial matter. Here's an example of hooking up an event handler to the change event of the dropdown & then setting the label text:
$("#DropDownID").change(function () {
$("#LabelID").text("Your text here");
});
Just replace the IDs with the relevant values.
Post a Comment for "Change Label On Change Dropdownlistfor Value"