Created
April 17, 2012 16:31
-
-
Save anonymous/2407327 to your computer and use it in GitHub Desktop.
Using MiniProfiler for MVC AND Ajax with ServiceStack
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Html.Raw(HttpUtility.HtmlDecode(Profiler.RenderIncludes().ToString())) | |
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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