“ASP.NET CORE 3.1 AJAX Partial View” Code-Antworten

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);
}
Sonic

ASP.NET CORE 3.1 AJAX Partial View

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

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

    });
</script>
Sonic

ASP.NET CORE 3.1 AJAX Partial View

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

<div id="div1"></div>
Sonic

Ähnliche Antworten wie “ASP.NET CORE 3.1 AJAX Partial View”

Fragen ähnlich wie “ASP.NET CORE 3.1 AJAX Partial View”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen