Solved

asp.net web page not showing image which is under web control

Posted on 2009-04-01
9
523 Views
Last Modified: 2012-05-06
I have website which has two folder one is controls and  this folder contains one web control.
and second folder is images which contains all the images.

when i view control in design view then it is showing the images.
but when i add the control on my web page which in in the root dir then the web control does not show images.

why is this happening?
here is the code for my webcontrol
 
<table width="100%" height="70" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="14%" align="center" valign="middle"><img src="../Images/wi0054-64.gif" width="64" height="64" /></td>
    <td width="86%"><img  src="../Images/mainlogo.jpg" width="400" height="70" /></td>
  </tr>
</table>

Open in new window

0
Comment
Question by:ziorrinfotech
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 8

Expert Comment

by:JRockFL
ID: 24039617
Sounds like a path issue. Try this
<img src="/Images/wi0054-64.gif" width="64" height="64" />
<img  src="/Images/mainlogo.jpg" width="400" height="70" />

Or you can use the asp:image control and ="~/Images/wi0054-64.gif"
0
 
LVL 7

Accepted Solution

by:
vbwizardry earned 125 total points
ID: 24039891
1. I would do it a bit differently. I would use asp.net relative path directive.
2. I would also make sure that you have Images folder under you application root.
<table width="100%" height="70" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="14%" align="center" valign="middle"><img runat=server" src="~/Images/wi0054-64.gif" width="64" height="64" /></td>
    <td width="86%"><img runat=server" src="~/Images/mainlogo.jpg" width="400" height="70" /></td>
  </tr>
</table>

Open in new window

0
 

Author Comment

by:ziorrinfotech
ID: 24040411
I tried both the solution but it did not work.

I am giving the screen shot of of my web solution. may be it will help you
untitled.JPG
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 7

Expert Comment

by:vbwizardry
ID: 24040633
1. Can you post an image with images folder content.
2. When do you not see an image?
    - When you publish the application to a production server?
    - When you add it to a page in design view under VS.NET?
0
 
LVL 8

Expert Comment

by:JRockFL
ID: 24040675
Are the files on a network share?
0
 

Author Comment

by:ziorrinfotech
ID: 24046604
i am sending the whole solution,
no all my files are on local drive only.

I am not able to see the images when i run the login page and when i view the page in design view.
I can only see images when i view the web control in design view
0
 

Author Comment

by:ziorrinfotech
ID: 24046612
EE does not allowed me to upload the whole project as zip format.

so I am uploading one image which is inside images folder
wi0054-64.gif
0
 
LVL 6

Expert Comment

by:ITHelper80
ID: 24056521
Do you have subfolder under the Image folder?
0
 

Author Comment

by:ziorrinfotech
ID: 24074328
No images are under Images folder only
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question