<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" media="screen" href="/App_Themes/default/rss.xslt"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:evnet="http://www.mscommunities.com/rssmodule/"><channel><title>Comment Feed for Absolute Image Locations and Master Pages (TechOff on Channel 9)</title><atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/forums/techoff/250382-absolute-image-locations-and-master-pages/rss/default.aspx" /><image><url>http://mschnlnine.vo.llnwd.net/d1/Dev/App_Themes/C9/images/feedimage.png</url><title>Comment Feed for Absolute Image Locations and Master Pages (TechOff on Channel 9)</title><link>http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/</link></image><description>Absolute Image Locations and Master Pages</description><link>http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/</link><language>en-us</language><pubDate>Tue, 23 Jan 2007 19:14:20 GMT</pubDate><lastBuildDate>Tue, 23 Jan 2007 19:14:20 GMT</lastBuildDate><generator>EvNet (EvNet, Version=1.0.3599.6114, Culture=neutral, PublicKeyToken=null)</generator><item><title>Re: Absolute Image Locations and Master Pages</title><description>I found that If I modify the style sheet to include a link to a css, and have the css reside in the sub directory, then the image will pull from the sub-dir.&lt;br&gt;&lt;br&gt;Anyone have a better solution.&lt;br&gt;&lt;br&gt;One downside, I have to copy the .css to each sub dir.&amp;nbsp; The sub-dir has it's own images folder where the custom image resides.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=280765</link><pubDate>Tue, 23 Jan 2007 19:14:20 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=280765</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/280765/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I found that If I modify the style sheet to include a link to a css, and have the css reside in the sub directory, then the image will pull from the sub-dir.Anyone have a better solution.One downside, I have to copy the .css to each sub dir.&amp;nbsp; The sub-dir has it's own images folder where the custom image resides.</evnet:previewtext><dc:creator>Bob_Chauvin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/280765/Trackback.aspx</trackback:ping></item><item><title>Re: Absolute Image Locations and Master Pages</title><description>I have a similare need.&amp;nbsp; I have a root site with child sites.&amp;nbsp; Each child site is based on a master.&amp;nbsp; Each child site needs a unique logo, but when the image tag is resolved, it is always based on the location of the master page, at the root, so images always come from the root instead of the sub-site images folder.&lt;br&gt;&lt;br&gt;How can I use a master page for sub-sites, and pull images from the sub-site Images folder?:|&lt;br&gt;&lt;br&gt;RootSite&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Images&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubSite&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; Images&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; SubSite&lt;br&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;  Images&lt;br&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=280719</link><pubDate>Tue, 23 Jan 2007 17:21:22 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=280719</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/280719/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>I have a similare need.&amp;nbsp; I have a root site with child sites.&amp;nbsp; Each child site is based on a master.&amp;nbsp; Each child site needs a unique logo, but when the image tag is resolved, it is always based on the location of the master page, at the root, so images always come from the root&amp;#8230;</evnet:previewtext><dc:creator>Bob_Chauvin</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/280719/Trackback.aspx</trackback:ping></item><item><title>Re: Absolute Image Locations and Master Pages</title><description>&lt;P&gt;You can add the onmouseover event to an image control. VS will complain but ignore it. When the codes gets to the client it will be an html image tag and be valid.&lt;/P&gt;
&lt;P&gt;You could also do a user control. And write your menu to a blank user control by registering javascript that does document.write(). Register&amp;nbsp;and then call the&amp;nbsp;function in a&amp;nbsp;&amp;lt;script&amp;gt; tag in the user control's body.&amp;nbsp;If the warning breaks any standards you may have at your work.&lt;BR&gt;&lt;BR&gt;Or you could use an ASP.NET Menu Control, which has a full eventing stack clientside. If it is just a text menu&amp;nbsp;with roll over effects you are just waisting you time anyways since the ASP.NET Menu control is designed just for that.&lt;/P&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=269158</link><pubDate>Thu, 30 Nov 2006 21:21:49 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=269158</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/269158/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>You can add the onmouseover event to an image control. VS will complain but ignore it. When the codes gets to the client it will be an html image tag and be valid.
You could also do a user control. And write your menu to a blank user control by registering javascript that does document.write().&amp;#8230;</evnet:previewtext><dc:creator>odujosh</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/269158/Trackback.aspx</trackback:ping></item><item><title>Re: Absolute Image Locations and Master Pages</title><description>&lt;BLOCKQUOTE&gt;&lt;div&gt;odujosh wrote:&lt;/div&gt;&lt;div&gt;﻿Many ways to skin this cat (in order of ease):&lt;BR&gt;1)Move to an ASP.NET Image control. Then the '~' will work. Or add the runat attribute to the image tag. The URL will be resolved before it is sent down, so it will look like an absolute path client side.&lt;BR&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;BR&gt;&lt;BR&gt;The Javascript in my Master Page is primarily to do with swapping images when the mouseover event occurs.&amp;nbsp; Problem is that Image location cannot be determined if in a page in a sub-folder from root and also in a page at root when using Master Pages.&lt;BR&gt;&lt;BR&gt;I could not see anywhere in the ASP.NET Image control that I could emulate the MouseOver behaviour.&amp;nbsp; Am I missing something ?&lt;BR&gt;&lt;BR&gt;regards&lt;BR&gt;&lt;BR&gt;Mike</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=269100</link><pubDate>Thu, 30 Nov 2006 16:57:21 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=269100</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/269100/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>odujosh wrote:﻿Many ways to skin this cat (in order of ease):1)Move to an ASP.NET Image control. Then the '~' will work. Or add the runat attribute to the image tag. The URL will be resolved before it is sent down, so it will look like an absolute path client side.The Javascript in my Master Page is&amp;#8230;</evnet:previewtext><dc:creator>m1keread</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/269100/Trackback.aspx</trackback:ping></item><item><title>Re: Absolute Image Locations and Master Pages</title><description>Thanks guys, the "~/" does not work (neither does a "/" at the start.&amp;nbsp; Even though any documentation I read says that they both should take you to the root of the site and go down into the Images folder from there.&amp;nbsp; Unsure why this is.&lt;BR&gt;&lt;BR&gt;The &amp;lt;%=Page.ResolveURL("~/Images/Image1.jpg")%&amp;gt;&lt;BR&gt;&lt;BR&gt;Works OK for standard HTML &amp;lt;IMG&amp;gt; tags, but I cant seem to get it to work in following codesnippets that I also have in my Photoshop /GoLive generated HTML.&lt;BR&gt;&lt;BR&gt;
&lt;P&gt;function preloadImages() {&lt;/P&gt;
if (document.images) {
&amp;nbsp; b_disclosure_o = newImage('/images/b_disclosure-o.jpg');
&amp;nbsp; b_applicants_o = newImage('/images/b_applicants-o.jpg');
&amp;nbsp; b_problems_o = newImage('/Images/b_problems-o.jpg');
&amp;nbsp; b_performance_o = newImage('/images/b_performance-o.jpg');
&amp;nbsp; preloadFlag = true;
}&lt;BR&gt;&lt;BR&gt;or&lt;BR&gt;&lt;BR&gt;
&lt;P&gt;onmouseover="changeImages('b_applicants', 'images/b_applicants-o.jpg'); return true;"&lt;BR&gt;&lt;BR&gt;Where the "changeImages(...)" is a Javascript function, again generated by Photoshop/GoLive.&lt;BR&gt;&lt;BR&gt;&lt;BR&gt;So, to re-cap.&lt;BR&gt;&lt;BR&gt;1.&amp;nbsp; Does the &amp;lt;%=Page.ResolveURL("~/Images/Image1.jpg")%&amp;gt; work for Javascript image URI's&lt;BR&gt;2.&amp;nbsp; Should the "~/Images/Image1.jpg" or "/Images/Image1.jpg" work for standard HTML, ASP.NET controls and Javascript.&lt;BR&gt;3.&amp;nbsp; Am I going to have to re-build all the Photoshop generated stuff my own CSS (And will this still work)&lt;BR&gt;&lt;BR&gt;The whole problem seems to stem from the fact that I am using a Master Page and have some pages at the root and some "Protected" pages in sub-folders and as such, cannot use a relative URI in the Master Page.&lt;BR&gt;&lt;BR&gt;Looking forward to your thoughts again&lt;BR&gt;&lt;BR&gt;regards&lt;BR&gt;&lt;BR&gt;Mike&lt;BR&gt;&lt;BR&gt;&lt;/P&gt;</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=269099</link><pubDate>Thu, 30 Nov 2006 16:54:51 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=269099</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/269099/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Thanks guys, the "~/" does not work (neither does a "/" at the start.&amp;nbsp; Even though any documentation I read says that they both should take you to the root of the site and go down into the Images folder from there.&amp;nbsp; Unsure why this is.The&amp;#8230;</evnet:previewtext><dc:creator>m1keread</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/269099/Trackback.aspx</trackback:ping></item><item><title>Re: Absolute Image Locations and Master Pages</title><description>Many ways to skin this cat (in order of ease):&lt;BR&gt;1)Move to an ASP.NET Image control. Then the '~' will work. Or add the runat attribute to the image tag. The URL will be resolved before it is sent down, so it will look like an absolute path client side.&lt;BR&gt;2)Resolve it a ASP.NET script tag:&lt;BR&gt;&amp;lt;img src="&amp;lt;%=Page.ResolveUrl("~/image/myimage.jpg")&amp;gt;" /&amp;gt;&lt;BR&gt;3)You can also use themes include the images in your theme folder then allocate them in a CSS thats in the theme. &lt;BR&gt;&lt;BR&gt;I would always recommend resolving URLs at the server. There is no reason not to.&lt;BR&gt;&lt;BR&gt;Using img tags in general is a&amp;nbsp;bad move. ASP:IMAGE, ASP:ImageButton, and other controls in ASP.NET cause far less headaches.</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=269027</link><pubDate>Thu, 30 Nov 2006 13:39:07 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=269027</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/269027/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Many ways to skin this cat (in order of ease):1)Move to an ASP.NET Image control. Then the '~' will work. Or add the runat attribute to the image tag. The URL will be resolved before it is sent down, so it will look like an absolute path client side.2)Resolve it a ASP.NET script tag:&amp;lt;img&amp;#8230;</evnet:previewtext><dc:creator>odujosh</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/269027/Trackback.aspx</trackback:ping></item><item><title>Re: Absolute Image Locations and Master Pages</title><description>Thanks Rotem, &lt;BR&gt;&lt;BR&gt;I am pretty sure that I tried this in one of my many earlier attempts and it still failed.&lt;BR&gt;&lt;BR&gt;I will try again tonight (Not got code at work).&amp;nbsp; Will post pucka example if it fails.&lt;BR&gt;&lt;BR&gt;Mike</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=269018</link><pubDate>Thu, 30 Nov 2006 13:18:45 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=269018</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/269018/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Thanks Rotem, I am pretty sure that I tried this in one of my many earlier attempts and it still failed.I will try again tonight (Not got code at work).&amp;nbsp; Will post pucka example if it fails.Mike</evnet:previewtext><dc:creator>m1keread</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/269018/Trackback.aspx</trackback:ping></item><item><title>Re: Absolute Image Locations and Master Pages</title><description>Use "~/Images/Image1.jpg". The "~" means the root of the application.&lt;BR&gt;&lt;BR&gt;Rotem</description><comments></comments><link>http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=268986</link><pubDate>Thu, 30 Nov 2006 10:02:53 GMT</pubDate><guid isPermaLink="false">http://channel9.msdn.com/forums/TechOff/250382-Absolute-Image-Locations-and-Master-Pages/?CommentID=268986</guid><evnet:views>0</evnet:views><evnet:viewtrackingurl>http://channel9.msdn.com/268986/WebViewBug.aspx?EVT=0</evnet:viewtrackingurl><evnet:previewtext>Use "~/Images/Image1.jpg". The "~" means the root of the application.Rotem</evnet:previewtext><dc:creator>Rotem Kirshenbaum</dc:creator><slash:comments>0</slash:comments><wfw:commentRss></wfw:commentRss><trackback:ping>http://channel9.msdn.com/268986/Trackback.aspx</trackback:ping></item></channel></rss>