Following is a piece of xsl code
<tr>
<td class="colHeader1">Last Name
</td>
<td class="cellstyle1">
<input type="text" name="srchLname" style="width:100%" tabindex="1"/>
</td>
<td class="colHeader1">Primary Telephone
</td>
<td class="cellstyle1">
<input type="text" name="srchPhone" style="width:100%"></input>
</td>
<td rowspan="2" align="right">
<img src="images/search.gif" style="cursor:hand" onclick="doCustSrch()"></img>
<img src="images/clear.gif" style="cursor:hand" onclick="clearCustSrch()"></img>
</td>
</tr>
On using this code the images doesnt showup in the page(search.gif
,clear.gif
)
this is not an ASP issue but rather a physical position one.
Let's imagine that you have this tree of contents:
|
|-- _Assets
| |-- Css
| |-- styles.css
| |-- Scripts
| |-- jquery.min.js
| |-- Images
| |-- search.gif
| |-- clear.gif
|-- Admin
| |-- default.asp
|-- Account
| |-- default.asp
|-- ...
|
if you want to point to the search.gif
image from Admin/default.asp
your image localization will be:
You are in the
Admin
folder, so let's go back one folder, positioning in theroot
../
Let's find the entire path from the root now
_Assets/Images/Search.gif
Join both paths
<img src="../_Assets/Images/Search.gif" alt="" />
You you are using a CSS styling under styles.css
your start position is the folder that holds the styles.css
file and never the page where it's been called.
So, in your example, you should see if you have something like this:
|-- mypage.asp
|-- images
| |-- search.gif
| |-- clear.gif
I hope this helps you clear any wondering in pointing the files to and from where.
Just for your information, and I don't know if the old ASP uses the ~
char, but in ASP.NET we tend to use:
`<img src="~/_Assets/Images/Search.gif" alt="" />`
where the ~
wildcard char means "Root of website", so, no matter where we are, in a file under n
child folders or in the root, the path is always the full path with the ~
char on the start.
精彩评论