user2835256
user2835256

Reputation: 415

How to Show image in AspxImage?

I want to show image by selecting it from Documents folder in my PC in desktop.

I am writing:

 ASPxImage1.ImageUrl = "C:\\Documents\\Pictures\\AspxImage.png";

But this is not showing anything. How to show this image?

Upvotes: 0

Views: 1731

Answers (1)

Sudhakar Tillapudi
Sudhakar Tillapudi

Reputation: 26199

Problem : Web Applications does not have the permissions to access the Local Drives of the client machines due to security concerns.

Solution : you need to create a folder called Images in your project folder and access it using relative path.

Try This:

ASPxImage1.ImageUrl = Server.MapPath("~/Images/AspxImage.png");

Upvotes: 2

Related Questions