Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model Cars.Web_New.Models.DropDownViewModel
- @using (Ajax.BeginForm("SelectYear", "Home", new AjaxOptions()
- {
- HttpMethod = "POST",
- OnSuccess = "displayData; UpdateModelsHiddenForms('SelectedCarYearId','year-input')"
- //OnSuccess = "UpdateModelsHiddenForms('SelectedModelId', 'model-input')"
- }, new { id = "year-dropdown" }))
- {
- @Html.DropDownListFor(
- m => m.SelectedCarYearId,
- new SelectList(Model.CarYears, "Id", "Year"),
- new { id = "year-input" }
- )
- }
- <script>
- $("#year-input").change(function () {
- $("#year-dropdown").submit();
- });
- function displayData(data) {
- // UpdateModelsHiddenForms();
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement