Accessing a file stored in the DB folder
-
I'm building a web application in ASP.NET which stores data in a database, and there also the sting to a picture stored outside the application root folder, in the DB/ProductPix folder. This works fine, but my problem occur when I try to show the image stored in the db folder. Can't find a way to get the riht path to the image. Tried to use different versions of this code in my aspx file: " width="150"> There might be an easier way to store images on server (different folder etc), but since i figured out the DB folder is the only folder with Read/Write access. Correct me if I'm wrong! Hope someone can help me out ;) Thanks in advance!
-
I'm building a web application in ASP.NET which stores data in a database, and there also the sting to a picture stored outside the application root folder, in the DB/ProductPix folder. This works fine, but my problem occur when I try to show the image stored in the db folder. Can't find a way to get the riht path to the image. Tried to use different versions of this code in my aspx file: " width="150"> There might be an easier way to store images on server (different folder etc), but since i figured out the DB folder is the only folder with Read/Write access. Correct me if I'm wrong! Hope someone can help me out ;) Thanks in advance!
Hi, Its not like only in the db folder u can upload images u can do that at any folder untill its impersonated!! u can use the Request.PhysicallapplicationPath this will return u the pyhsical application path (note: application folder path not page folder path) say u r having your pictures running in c:\senthil\Mywebapp\picture\ the physicalapplicationpath will give u c:\senthil\Mywebapp\ this as out put from here you can map and go to the Picture Path so use as " width="150"> I hope this will solve your problem!!:rose: Loving Code, R. Senthil Kumaran