I have a Refresh button on my page that will execute an asp.net mvc ajax message to refresh some of the content on the page. The update / update process can take a long time (about 10-20 seconds). Right now, the user needs to manually click the "Update" button to trigger the update. I want to automatically start the update every X minutes. To a large extent, I want to run the same Ajax post as shown below (and it would be nice to display LoadElementId as well).
<% using (Ajax.BeginForm("Refresh", null,
new {userId=Model.UserId},
new AjaxOptions { UpdateTargetId = "UserForm", LoadingElementId = "RefreshingDiv" },
null))
{
%>
<button type="submit">
<img src="/zsys/img/icons/refresh.png" alt="Refresh" />
Refresh
</button>
<% } %>
How can I force an asp.net mvc ajax to be returned?
source
share