Getting file from folder in mvc 4

Dec 24 2015 2:24 AM
hi all,
 
i am getting problem while showing the image in View page.
 
i inserted successfully in Path.Combine(@"C:\inetpub\RMS\FileStructure\Employee\" + "Photos");
 
after that i need to display the image . i wrote code in controller
 
i.e. objEmployeeInfo.ImagePath = Path.Combine(@"C:\inetpub\RMS\FileStructure\Employee\" + employeDetails.Image);
 
in view : <img src='@Model.ImagePath' />
 
this model.imagepath is getting proper image path.
 
but it is showing error like : Not allowed to load local resource: file:///C:/inetpub/RMS/FileStructure/Employee/Photos/201512241206078792_4.jpg
 
plz help me. what i need to do?
 
 
 

Answers (4)