Override ~ behaviour in controls
Posted
by cpf
on Stack Overflow
See other posts from Stack Overflow
or by cpf
Published on 2010-01-16T19:08:50Z
Indexed on
2010/03/26
9:03 UTC
Read the original article
Hit count: 320
Quick backstory: I'm making a "framed" version of my site that has a different master page than normal (one suitable for iframing). It's accessed by mysite.com/Framed/whatever
, instead of mysite.com/whatever
. This is rewritten in IIS to mysite.com/whatever?framed=true
. That works fine.
The issue I'm having is that all the links are relative using a ~ like ~/Server.aspx
which works fine in the normal site. I need to override that so instead of producing ../Server.aspx
(as it "should") it produces ../Framed/Server.aspx
or Server.aspx
.
Currently this means that the page goes back to it's normal view (mystite.com/whatever2
) as soon as you click on a link, I want it to continue to stay in mysite.com/Framed/...
© Stack Overflow or respective owner