0
스크립트ASP.NET MVC 두 종속 드롭 다운 목록?
<script type="text/javascript">
$(document).ready(function() {
$('musteri_sno').change(function() {
$('form_sayac_secimi').submit(function() {
if ($(this).valid()) {
$.ajax({
url: this.action,
type: this.method,
data: $(this).serialize(),
success: function (result) {
}
});
}
return false;
});
});
});
</script>
나는이 작업을 수행 할 수 있습니다 첫 one.How에서 반환 된 값으로 두 번째 드롭 다운을 채우려
@using (Html.BeginForm("SayacSecimiPartial", "SayacOkumalari", FormMethod.Post, new { id = "form_sayac_secimi" }))
{
<table>
<tr>
<td>
@Html.DropDownList("musteri_sno", (SelectList)ViewBag.musteri_id, "--Müşteri Seçiniz--", new { id = "musteri_sno" })
</td>
<td>
@Html.DropDownList("sayac_no", Enumerable.Empty<SelectListItem>(), "-- Sayaç Seçiniz --", new { id = "sayac_no" })
</td>
<td>
<input type="submit" value="Uygula" />
@Html.Hidden("sno", new { sno = ViewData["sno"] })
</td>
</tr>
</table>
}
HTML?
감사합니다.
이에 대한 예가 있습니까? –
작은 예를 추가했습니다. –