Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jc - 19 Mar 2008 17:00 GMT
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.
jc - 19 Mar 2008 18:27 GMT
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!
George Ter-Saakov - 19 Mar 2008 18:41 GMT
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.

> It appears no mater what I do, I can't seem to get resolveUrl to work
> inside a style property of my master page...
[quoted text clipped - 21 lines]
>
> Thanks for any help or information!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.