I have a tilde path. I would like to convert it into client url
var path = "~/Presentation/Resources/Images/masterPage/cleanup.png";
var a = '<%=Page.ResolveClientUrl(" '+path+' ") %>';
var b = '<%=ResolveUrl("~/Presentation/Resources/Images/masterPage/cleanup.png") %>';
alert("var a-->"+a);
alert("var b-->"+b);
although the code above seems the same, the results I obtain for var a and var b are very different.
Result
var a --> ~/Presentation/Resources/Images/masterPage/cleanup.png
var b --> ../../Resources/Images/masterPage/cleanup.png
I have a variable that stores the path, but I failed to get the result exactly like var b. What can I do for var a so that I can get the result like var b?