Solved

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

Posted on 2009-04-01
9
508 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.NET Web Form Variables being reset 2 26
Problem to page 4 75
Getting multiple values from a dataset ASP.NET(VB) 3 37
ASP.NET MVC 2 6
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

863 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

22 Experts available now in Live!

Get 1:1 Help Now