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
Post a Comment