BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
ASP.NET Core:
Partial View page(chart.cshtml)
@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
<ej-chart id="container"></ej-chart>
Index.cshtml:
<button onclick="changeDataSource()">Ajax</button>
function changeDataSource() {
$.ajax({
//...
});
}
Controller:
public ActionResult ChartData()
{
//...
return PartialView("chart");
}
|
_partialView(chart.cshtml):
<div>
<ej-chart id="container"></ej-chart>
</div>
<ej-script-manager></ej-script-manager>
Index.cshtml:
button onclick="changeDataSource()">Ajax</button>
<div id="partialPage"></div>
<script>
function changeDataSource() {
$.ajax({
url: '@Url.Action("ChartData", "Home")',
async: false,
success: function (data) {
$("#partialPage").html(data);
}
});
}
</script>
|