Hi there I am writing ASP.NET app
I want to access gif images stored in Images folder which is in turn stored in Project folder. See my Solution Explorer.
In GetImage.ashx (see solution explorer), I am unable to get images using this:
System.IO.FileStream _FileStream = new System.IO.FileStream("~/Images/" + imageFileName + ".gif", System.IO.FileMode.Open, System.IO.FileAccess.Read);
It gives exception Couldd not find a part of path 'C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\10.0\~\Images\alien_tai_chi_md_wht.gif'.
Please help. Currently I am using full directory specification:
System.IO.FileStream _FileStream = new System.IO.FileStream(@"C:\Users\MAHESH\Desktop\s\ASPNETWebsites\WebDataDisplay\Images\"+imageFileName+".gif", System.IO.FileMode.Open, System.IO.FileAccess.Read);