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

  • Thread starter Thread starter jc
  • Start date Start date
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.
 
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!
 
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.
 
Back
Top