Reputation: 779
I have Ajax.ActionLink which returns partialview in my dahsboard view as below :
@Ajax.ActionLink("2013", "chartAjax", "Dashboard", new { yearForChart = "2013" }, new AjaxOptions { UpdateTargetId = "chartAjax", HttpMethod = "GET"})
But it is calculating the financial data and counts of data. So it is taking too time to load. I want to call this Ajax.ActionLink, after the Dashboard load has been completed. And i can show a loading bar while the partialview is loading ?
Thanks.
Upvotes: 0
Views: 705
Reputation: 25370
i'd just use jquery, something like
<script>
$(document).ready(function() {
$.ajax({
type:"GET",
url: "/Dashboard/chartAjax/2013"
}).success(function(responseData){
$('#chartAjax').html(responseData);
}
};
});
</script>
Upvotes: 1