Skip to content

Instantly share code, notes, and snippets.

@schotime
Created June 2, 2013 08:51

Revisions

  1. schotime renamed this gist Jun 2, 2013. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion gistfile1.txt → gistfile1.cs
    Original file line number Diff line number Diff line change
    @@ -8,4 +8,4 @@
    // The problem is that the SiteResource method uses Request.ApplicationPath under the covers, but we are doing some
    // URL rewriting so the URL is not the same as the ApplicationPath.

    // I should be able to create my own SiteResource method on my base view class.
    // Update: I should be able to create my own SiteResource method on my base view class???
  2. schotime created this gist Jun 2, 2013.
    11 changes: 11 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    <img src="~/test.aspx" />

    // This complies to
    Response.Write("<img src=\"");
    Response.Write(SiteResource("~/test.aspx"));
    Response.Write("\" />");

    // The problem is that the SiteResource method uses Request.ApplicationPath under the covers, but we are doing some
    // URL rewriting so the URL is not the same as the ApplicationPath.

    // I should be able to create my own SiteResource method on my base view class.