Skip to content

Instantly share code, notes, and snippets.

@robertmilne
Created May 26, 2011 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robertmilne/993242 to your computer and use it in GitHub Desktop.
Save robertmilne/993242 to your computer and use it in GitHub Desktop.
<content var="styles"><render/></content>
# Response.Write(new Microsoft.Ajax.Utilities.Minifier().MinifyStyleSheet(styles));
<content var="script"><render/></content>
# Response.Write(new Microsoft.Ajax.Utilities.Minifier().MinifyJavaScript(script));
<content var="html"><render/></content>
# Response.Write(System.Text.RegularExpressions.Regex.Replace(html,@"^\s+|\s+$", "", System.Text.RegularExpressions.RegexOptions.Multiline));
<script if="bool.Parse('false')" src="/Scripts/jquery-1.4.2.min.js" type="text/javascript"></script>
<script type="text/javascript">
<minifyJS>
$(function () {
// We don't need no stinkin' comments
$("#dashboard").load("!{Url.Action(MVC.Test.Dashboard())}");
});
</minifyJS>
</script>
<script type="text/javascript">$(function(){$("#dashboard").load("/Test/Dashboard")})
</script>
<style type="text/css">
<minifyCSS>
#dashboard
{
margin: 1em;
padding: 1em;
border: 1px solid #222;
}
</minifyCSS>
</style>
<style type="text/css">#dashboard{margin:1em;padding:1em;border:1px solid #222}
</style>
<removeWhitespace>
<table>
<tr>
<td>Dashboard:</td>
<td id="dashboard"></td>
</tr>
</table>
</removeWhitespace>
<table>
<tr>
<td>Dashboard:</td>
<td id="dashboard"></td>
</tr>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment