using Masterpage in sub dir

J

Jerry Qu

Hi All,

1) We have masterpage in the root dir
2) if we want ot use materpage for pages in sub dirs, there is probelm to
display images called in the masterpage:

<table style="background-image: url(images/header_background.gif);...
The image will not show.

Any suggestion

TIA

Jerry
 
M

Michael Nemtsev

Hello Jerry,

Use the root-relative path for your images like "~/images/header_background.gif"

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

JQ> Hi All,
JQ>
JQ> 1) We have masterpage in the root dir
JQ> 2) if we want ot use materpage for pages in sub dirs, there is
JQ> probelm to
JQ> display images called in the masterpage:
JQ> <table style="background-image:
JQ> url(images/header_background.gif);... The image will not show.
JQ>
JQ> Any suggestion
JQ>
JQ> TIA
JQ>
JQ> Jerry
JQ>
 
C

Cowboy \(Gregory A. Beamer\)

Relative linking. I am not sure Michael's suggestion will work with a style,
but you can use relative position in CSS, as well. Have not done in awhile,
but I believe it is ./ in front of the image folder. THe ~ works with many
tags as root, but only when the particular tag's control inherits from
webcontrol and has the routine that finds root path.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************
Think outside the box!
*********************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top