System.Web.VirtualPathUtility.ToAbsolute -- The relative virtual path './images/gift-card.jpg' is not allowed here
<p>I'm trying to convert the relative path to the absolute path with System.Web.VirtualPathUtility.ToAbsolute()</p>

<p>But I got this error:</p>

<p>The relative virtual path './images/gift-card.jpg' is not allowed here.</p>

<p>By the way, the file structure is </p>

<p><strong>this code is in a .cs file and this file is in the same folder (let's say /root) with other .aspx files. The image is in a folder, /root/images/</strong> </p>

<p>Any ideas?</p>

<p><strong>ps:
even I change the path to '~/images/gift-card.jpg'  it still throws an exception: Unhandled Exception without further information.</strong> </p>
