How do I call a post actionresponse passing the selected dropdown item as a parameter from javascript within a view
问题 How do I call a post actionresponse passing the selected dropdown item as a parameter from javascript within a view within asp.net, razor, mvc Basically, as I'm sure you can tell from the below code, I'm trying to accomplish the above without much success. What should I change to be successful? Thanks <script type="text/javascript"> $(function() { $("#mydropdown").change(function() { var selectedItem = $(this).val(); $.ajax({ url: '@Url.Action("DoStuff", "MainController")', type: "Post", data