html - Update a Div with a PartialView -


i'm trying update div's value partial-view, have no idea write .html().

my controller-methode:

public iactionresult updatediv() {     return view("_partialview1"); } 

my javascript function:

$.ajax({        url: "/home/updatediv/"     }).done(function () {         $("#updatediv").html();     }) 

the div:

<div id="updatediv" style="width: 400px; height: 400px;"></div> 

my partial-view:

<h1>hello</h1> 

have tried add respone param done callback function? below code snippet:

$.ajax({        url: "/home/updatediv/"     }).done(function (response) {         $("#updatediv").html(response);     }); 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -