Hi all quick question i hope.

I want to pass a value from a jQuery script into HTML.ActionLink to details action in controller

It working like i choose item in dropdownlist and in jQuery i get an id of that item after it i want to get that id be passed into ActionLink how can i achieve it or what i supose to change in my code.

<script>
$(function() {
       $('#reductions').change(function () {
           var Id = $('#reductions').val();
           });
       });
</script>

        <div class="form-horizontal">
            <div class="form-group">
                <div class="col-md-10">
 @Html.DropDownList("reductions", new SelectList(dbContext.Reductions,"ReductionId", "Name")  
                </div>
            </div>
        </div>
@Html.ActionLink("Details", "Details", "Reductions", new {id = ????WHAT PUT HERE?????}, new {})

Please tell me what should i change in script area or in Action Link that i could make i work. I already study a lot of examples but no one seems to be working for me

Related posts

Recent Viewed