YOU CAN CONTINUE USING A CLIENT TAG (<img>, <link>, etc. ) WITH THE "~" TILDE WITH THIS WORKAROUND
You just need to use the System.Web.VirtualPathUtility.ToAbsolute("~") method to convert the ~ to the ApplicationPath.
So, if your file is located at "~/common/images/spacer.gif" and you need to specify this path in a client tag like <img>, ASP.NET would not
allow you to use this path unless you use a Server Control like <asp:Image>.
To continue using the client tag you can use:
<img src="<%=System.Web.VirtualPathUtility.ToAbsolute("~")%>/common/images/spacer.gif" />
and this would be resolved to "/MyApplication/common/images/spacer.gif" where the first forward slash (/) stands for the WebSite root. Thus, the tilde "~" is effectively resolved to "/MyApplication"
Alternatively, Control.ResolveClientUrl can be used. For example,
<img src='<%= ResolveClientUrl("~/common/images/spacer.gif")%>' />