Skip to content

Instantly share code, notes, and snippets.

@schotime
Created June 2, 2013 08:51
Show Gist options
  • Save schotime/5693072 to your computer and use it in GitHub Desktop.
Save schotime/5693072 to your computer and use it in GitHub Desktop.
Override URL resolution
<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.
// Update: I should be able to create my own SiteResource method on my base view class???
@RobertTheGrey
Copy link

Indeed you can do whatever you like in your Spark view as long as the method name is the same :)

@schotime
Copy link
Author

schotime commented Jun 2, 2013

Yeh...I was looking for a way to override something but I totally missed just replacing that method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment