Skip to content

Instantly share code, notes, and snippets.

Created April 17, 2012 16:31
Show Gist options
  • Save anonymous/2407327 to your computer and use it in GitHub Desktop.
Save anonymous/2407327 to your computer and use it in GitHub Desktop.
Using MiniProfiler for MVC AND Ajax with ServiceStack
@Html.Raw(HttpUtility.HtmlDecode(Profiler.RenderIncludes().ToString()))
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
$(document).ajaxComplete(function (e, xhr, settings) {
var ids = xhr.getResponseHeader('X-MiniProfiler-Ids');
if (ids != null) {
MiniProfiler.fetchResultsExposed($.parseJSON(ids));
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment