Click here to Skip to main content
15,907,236 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi...
i am facing problem when i am using image...
i got the image at my building side...
when i run the page or project i can't see the image...
instead of it i got the empty image with the no image symbol...
can u give any solution to get the image at my run time....
Posted
Comments
Vamshi Krishna Naidu 29-Oct-11 8:13am    
Check in the code where are you saving the image after uploading it into relative Folder. If you have the image saved and if you are retrieving the image from the correct folder, This should not happen.
Raghupathiraja 29-Oct-11 8:14am    
s i have checked... i am given correct folder and path too
Raghupathiraja 29-Oct-11 8:23am    
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Image ID="Image1" runat="server" ImageUrl="~/App_Data/images.jpg" />
<div>

</div>
</form>
</body>
</html>
Menon Santosh 29-Oct-11 8:13am    
check the path of image
Raghupathiraja 29-Oct-11 8:15am    
i had stored images in APP_DATA folder and retrieving from the same folder only...
but i can't get the image at my run time...

Read up on the Image control[^]

You will probably find it easier to use than the image tag as it can be configured using the designer. Just remeber to add the image to the project too ...

Best regards
Espen Harlinn
 
Share this answer
 
Comments
Raghupathiraja 29-Oct-11 8:18am    
this is the code i have used

<asp:Image ID="Image1" runat="server" ImageUrl="~/App_Data/images.jpg" />
Try Eliminating "~" and check. If you are having APP_DATA under your development project folder, No need to give "~". That should solve your problem.

Your code will be looking like this

ASP.NET
<asp:image id="Image1" runat="server" imageurl="/App_Data/images.jpg" xmlns:asp="#unknown" />


I Removed "~" in from Imageurl tag.
 
Share this answer
 
v2
Comments
Raghupathiraja 30-Oct-11 1:43am    
i am gets same prob with this code too friend...
i dont know whats the prob?

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