I have a simple view:
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
Administration
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>Indexer stats</h2>
<div id="Stats">
<% Html.RenderPartial("IndexerStats", CmsModels.Utilities.BackgroundIndexer.Default); %>
</div>
</asp:Content>
How can I automatically refresh the Partial View “IndexStats” every 10 seconds?
I have found this code, but it doesn’t compile with my version of MVC (2 RC).
Damn it, you spend ages looking for an answer, ask the question and then find the answer imediately afterwards.
Revised code is:
Indexer stats
However I am open to better ideas, or Html helpers.