Escaping Quotes in HMTL/ASPX? ResolveUrl?? <%

J

jc

This line fails because quotes inside the ResolveUrl causes a
terminatino of the style property. How can I do this?

<div id="TopShadow" style="height: 10px; width: 800px; background-
repeat: repeat-x;
background-image: url('<%ResolveUrl(''~/App_Themes/xxxx/Images/
top_bg_shadow.gif"')%>');">


Thanks for any help or information.
 
J

jc

It appears no mater what I do, I can't seem to get resolveUrl to work
inside a style property of my master page...

I've tried every quoting combination, but always end up with something
like this when it renders:

<div id="TopShadow" style='height: 10px; width: 800px;
background-repeat: repeat-x;
background-image: url('');'>


from this:

<div id="TopShadow" style='height: 10px; width: 800px;
background-repeat: repeat-x;
background-image: url('<%'= ResolveUrl("~/App_Themes/xxxxx/
Images/top_bg_shadow.gif")%>');'>
</div>


I'm having to use ResolveUrl in that i have pages under a subdirectory
that can't seem to find images, and my root pages dont work when I
directly address ~/

thanks.


Thanks for any help or information!
 
G

George Ter-Saakov

You have to many single quotes.
try this
<div id="TopShadow" style='height: 10px; width: 800px;
background-repeat: repeat-x;
background-image: url('<%=
ResolveUrl("~/App_Themes/xxxxx/Images/top_bg_shadow.gif")%>');>
</div>


George.
 

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