Pass (Send) DropDownList selected item from View to Controller using jQuery Ajax in ASP.Net MVC

leila398
 
on Nov 17, 2021 09:44 PM
338 Views

How can I get the selected item (from a dropdownlist) to then be sent to an Action in my controller.

Here's the script I have that takes the selected value from dropdownlist, but how do I send this to my Action Result as a parameter?

 View:

<script>
    //To get selected value an text of dropdownlist
    function SelectedValue(ddlObject) {
        //Selected value of dropdownlist
        var selectedValue = ddlObject.value;

        //send selectedValue to Action in controller?
    }
</script>

Controller:

public ActionResult GetMatterRef(string param)
{
    strParam = param;
}

Thanks

Download FREE API for Word, Excel and PDF in ASP.Net: Download
dharmendr
 
on Nov 18, 2021 05:26 AM