Mvc Razor Load Partial view using javascript

You can just load the Partial view using this code:

Load the Partial view to the DIV


        
$("#divdetail").load('@Url.Action("_Detail","GEMS_BCRpt")' + "?ID=" + ID );



 <script>

    $(function() {

        $("#btn").click(function() {

            var id = 10;

            var valoare = 'test';

            var url = '/TestingImages/Index2?Id=' + id + '&valoareselectata=' + valoare;

            window.location.href = url;

        });

    })

</script>

<input id="btn" type="button" value=“submit"/>



function changedet(ID) {

   

        $("#divdetail").load('@Url.Action("_Detail","GEMS_BCRpt")' + "?ID=" + ID );



    }

Comments

Popular posts from this blog

NPM Cordova byPass Proxy

Cannot Call Stored Procedure using Entity Framework