Click here to Skip to main content
15,881,588 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Can any 1 suggest me , How to Embed a Image from Local System(ie., From any local Drive of Local Machine) , I need to Display the image in Web Page using C# in ASP.net .



Regards,
SARAVANAN.M
Posted
Comments
OriginalGriff 25-May-11 6:06am    
By "Local System" do you mean client local, or server local?
Debojyoti Majumder 25-May-11 6:27am    
What problem you are facing in doing so..??
Sergey Alexandrovich Kryukov 25-May-11 10:51am    
What is local? Why this is a problem?
--SA
SARAVANAKUMAR.M 26-May-11 2:39am    
I have Set the Image Path in a String Variable (ie, string tempath = "E:\\SARAVANA/PROJ/Bangalore.jpg" ;) but the image is not displaying , Can any one suggest me that I want to Display the image from the " 'E: Drive' or 'C Drive' or 'D Drive' " . After that im Passing the variable 'tempath' as imageURL .

If you mean local system as the webserver you are running on then have a look here:
Allow your ASP.NET to Access your Resources[^]

If you mean the client machine as local system then this is not that easy. The client should then first upload the image to the server before it can be embedded.

Good luck!
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 25-May-11 10:51am    
That is correct. (OP's terminology sucks, that's the problem. :-)
My 5.
--SA
I think you are asking something like this

How to show the selected image file without saving file in the disk before upload[^]

Check this it's working in 5 browsers(IE, Firefox, Chrome, Opera, Safari) BTW I have checked
 
Share this answer
 
Comments
SARAVANAKUMAR.M 26-May-11 5:26am    
I have Set the Image Path in a String Variable (ie, string tempath = "E:\\SARAVANA/PROJ/Bangalore.jpg" ;) but the image is not displaying , Can any one suggest me that I want to Display the image from the " 'E: Drive' or 'C Drive' or 'D Drive' " . After that im Passing the variable 'tempath' as imageURL .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900