Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-04-01
9
Medium Priority
?
546 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

715 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