@Html.DropDownList("optionId", new SelectList(SelectListData), "Select an option")
@Html.TextBox("controlId")
<script> $("#optionId").on("change", function () { if ($("#optionId option:selected").index() == 0) { $("#controlId").hide(); } else { $("#controlId").show(); } }); </script>
Hiç yorum yok:
Yorum Gönder