I need to get the current absolute url of my site from inside an aspx page (no codebehind). I tried $SPUrl, but it get's converted into a relative url.
<asp:Literal runat="server" text="<% $SPUrl:~Site/mypage.aspx %>" />
results in "/mypage.aspx". It's important that I get the full absolute url starting with "http://".
<asp:Literal runat="server" text="<% $SPUrl:~SiteCollection/mypage.aspx %>" />
does the same. The goal is to get this url: "http://myspweb.com/mypage.aspx" as result.