Created
June 2, 2013 08:51
-
-
Save schotime/5693072 to your computer and use it in GitHub Desktop.
Override URL resolution
This file contains hidden or 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
<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??? |
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
Indeed you can do whatever you like in your Spark view as long as the method name is the same :)