why can't I programmtically set the imageurl on an Image control?
<p>I have an ASP.NET 2010 app and am trying something very simple. I use Image control through out and basically wanted to say, before I assign an image to it (from a class) look for the image; if it's not there, use the default no_image jpeg I have. I have verified the image is there ad naseum. If I set the property in the IDE to point to this image, it'll display. However, if I set it programmtically, even if I hard-code the path programmatically, it doesn't show. </p>

<p>Forgettign about getting the proper path and all that, (of which Ive tried several things) I can;t even hard code the relative path. Here I copied &amp; pasted the relative path from the properties window...</p>

<pre><code>Image1.ImageUrl = "~/UploadedPictures/Users/no_profile_picture.jpg" 
</code></pre>

<p>This doesn't work. It translates into src="../../UploadedPictures/Users/no_profile_picture.jpg" which is correct but the image doesn't display.</p>

<p>If I hardcode the absolute path it doesn't work either...</p>

<pre><code>Image1.ImageUrl = "C:\Inetpub\wwwroot\myApp\UploadedPictures\Users\no_profile_picture.jpg"
</code></pre>
