Answers for "asp.net core 3.1 ajax partial view"

1

asp.net core 3.1 ajax partial view

<script>
    $(document).ready(function () {

        $("#button1").click(function () {
            $("#div1").load("/Home/GetPartial");
        });

    });
</script>
Posted by: Guest on August-19-2020
1

asp.net core 3.1 ajax partial view

public IActionResult GetPartial()
{
    List<string> countries = new List<string>();
    countries.Add("USA");
    countries.Add("UK");
    countries.Add("India");

    return PartialView("_CountriesPartial",countries);
}
Posted by: Guest on August-19-2020
0

asp.net core 3.1 ajax partial view

<button type="button" id="button1">Load Partial View</button>

<div id="div1"></div>
Posted by: Guest on August-19-2020

Code answers related to "asp.net core 3.1 ajax partial view"

Code answers related to "Javascript"

Browse Popular Code Answers by Language