Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-04-01
9
Medium Priority
?
551 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 500 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

927 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