?
Solved

Images not showing in Visual Web Developer

Posted on 2010-11-22
15
Medium Priority
?
1,215 Views
Last Modified: 2012-05-10
I am using Visual Web Developer 2008.
I have code in the stylesheet to display a box with rounded corners.
The images show in the Design view, and they show when I view the live web site, but they do not show when I run Debug.
Any ideas?

Here is some of the code in the stylesheet.


.roundedcornr_box_light_blue {
      background: url(/assets/images/roundedcornr_light_blue_tl.png) no-repeat top left;
}
.roundedcornr_top_light_blue {
      background: url(/assets/images/roundedcornr_light_blue_tr.png) no-repeat top right;
}
.roundedcornr_bottom_light_blue {
      background: url(/assets/images/roundedcornr_light_blue_bl.png) no-repeat bottom left;
}
.roundedcornr_bottom_light_blue div {
      background: url(/assets/images/roundedcornr_light_blue_br.png) no-repeat bottom right;
}
.roundedcornr_content_light_blue {
      background: url(/assets/images/roundedcornr_light_blue_r.png) top right repeat-y;
}
0
Comment
Question by:rrhandle8
[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
  • 9
  • 6
15 Comments
 
LVL 21

Expert Comment

by:masterpass
ID: 34192496
you may want to use the width/ height attribute to get it done

.roundedcornr_box_light_blue {
      background: url(/assets/images/roundedcornr_light_blue_tl.png) no-repeat top left;
      width: 100px;
      height: 100px;
}

give the exact height and width as per the image .. for eg : if the image is 100 x 100 px , give as above
0
 

Author Comment

by:rrhandle8
ID: 34192790
That did not work.  No images showed anyplace, not even the live site.
0
 
LVL 21

Expert Comment

by:masterpass
ID: 34192807
Can you provide the link to the live site so that I can take a look ?

also, I dont think you will need a "/" infront of the assets , change it to

 background: url(assets/images/roundedcornr_light_blue_tl.png) no-repeat top left;
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:rrhandle8
ID: 34192845
http://www.ticketstoregame.com/styling.aspx
See the boxes at the top of the page with purple and light blue outlines.  Works just fine on the live site, and in Design view.  Does not show when you run Debug.
0
 

Author Comment

by:rrhandle8
ID: 34192854
BTW: If you remove the leading / mark, nothing shows.
0
 
LVL 21

Expert Comment

by:masterpass
ID: 34192968
this is weird !!!

can you try to replace this class ONLY in ur DEBUG mode and let me know if the image shows up !!!

.roundedcornr_box_light_blue {
      background: url(http://www.ticketstoregame.com/assets/images/roundedcornr_light_blue_tl.png) no-repeat top left;
}

0
 

Author Comment

by:rrhandle8
ID: 34193035
Yes, that worked in Debug mode.
0
 
LVL 21

Expert Comment

by:masterpass
ID: 34193073
Are you sure you have the images in your local machine ? can you please verify the directory structure
( I know this sounds weird, assuming u published your site from the visual web developer) ...

try to add an image tag in site and choose the imageurl using "choose url" ... so that you will get an idea as to how the url is being refereed in the Visual Web Developer and just copy over the path as the URL .. that is the only way that I see to figure out what went wrong

hope this helps !
0
 

Author Comment

by:rrhandle8
ID: 34193100
Yes, they are on my local machine.  As I said, they show when you click the Design tab in VWD.

I cannot "choose url" because it is in the stylesheet.
0
 
LVL 21

Expert Comment

by:masterpass
ID: 34193117
yup .. that is why I asked you to put a test image tag in the designer

<asp:image id="someid" ImageUrl=

u will get a chooseurl when you put the = in the markup and choose the url so that you will know how the visual  web developer references the url
0
 

Author Comment

by:rrhandle8
ID: 34193151
Anything I use <asp:image id="someid" ImageUrl= with works fine.  All the images show.  It is just the images in the stylesheet.  Does that make sense?
0
 

Author Comment

by:rrhandle8
ID: 34193179
Is this what you meant:

<asp:Image ID="Image3" runat="server"
            ImageUrl="~/Assets/Images/roundedcornr_light_blue_bl.png" />
0
 
LVL 21

Accepted Solution

by:
masterpass earned 1000 total points
ID: 34193321
Did you try changing the url in the css exactly like that ?

background: url('~/Assets/Images/roundedcornr_light_blue_bl.png') no-repeat top left;

or

background: url('/Assets/Images/roundedcornr_light_blue_bl.png') no-repeat top left;

or

background: url('Assets/Images/roundedcornr_light_blue_bl.png') no-repeat top left;

try all the above !



0
 

Author Comment

by:rrhandle8
ID: 34193627
Tried them all, and retried them all.  Nothing.
0
 

Author Comment

by:rrhandle8
ID: 34193763
Solution:
background: url(../../assets/images/roundedcornr_light_blue_tl.png) no-repeat top left;

Go figure.  It worked just fine the way it was in the Design view, and on the live site.  I am confused.

Anyways, you made a heroic effort to help me.  Thank you!
0

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month9 days, 15 hours left to enroll

762 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