Solved

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

Posted on 2009-04-01
9
497 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 7

Expert Comment

by:vbwizardry
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 8

Expert Comment

by:JRockFL
Comment Utility
Are the files on a network share?
0
 

Author Comment

by:ziorrinfotech
Comment Utility
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
Comment Utility
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
Comment Utility
Do you have subfolder under the Image folder?
0
 

Author Comment

by:ziorrinfotech
Comment Utility
No images are under Images folder only
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now