<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title> Sundar Narasiman's Random Musings on .NET and SharePoint : SharePoint Customization</title><link>http://msmvps.com/blogs/sundar_narasiman/archive/tags/SharePoint+Customization/default.aspx</link><description>Tags: SharePoint Customization</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>SharePoint Master Page Customization - ASP.NET Image  Vs Html Image Controls</title><link>http://msmvps.com/blogs/sundar_narasiman/archive/2008/02/01/customize-master-page-banner-image-and-save-the-site-as-template.aspx</link><pubDate>Fri, 01 Feb 2008 08:27:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1489990</guid><dc:creator>lavssun</dc:creator><slash:comments>0</slash:comments><wfw:comment xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://msmvps.com/blogs/sundar_narasiman/commentapi.aspx?PostID=1489990</wfw:comment><comments>http://msmvps.com/blogs/sundar_narasiman/archive/2008/02/01/customize-master-page-banner-image-and-save-the-site-as-template.aspx#comments</comments><description>&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;&lt;/p&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;We&amp;nbsp;tried to customize the the master page of a SharePoint site (Team Site). The intent was to add banner image and icon to the master page.&amp;nbsp;We edited the master page using SharePoint Designer 2007.&amp;nbsp;We dragged and dropped the image to the master page and aligned it.&amp;nbsp;We saved all the changes. Then,&amp;nbsp;we refreshed the site. The changes were reflected.&amp;nbsp;We saved this customized site as the site template &amp;quot;.stp&amp;quot;&amp;nbsp;and shipped it &lt;/span&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Whenever someone creates a site using this &amp;quot;.stp&amp;quot;, the images are not rendered in their newly created site using this site template&lt;/span&gt;&lt;font face="Calibri" size="3"&gt;&amp;nbsp;&lt;/font&gt; 
&lt;p&gt;&lt;strong&gt;Cause of the Problem&lt;/strong&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;span style="FONT-SIZE:10pt;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;After analysis&amp;nbsp;we found that, the images in the master pages were not picking the&amp;nbsp;URL relative to the newly created site. It&amp;#39;s picking&amp;nbsp;the URL&amp;nbsp;relative to&amp;nbsp;old site, from which the template was created&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style="BACKGROUND-COLOR:#c0c0c0;"&gt;&amp;nbsp;&amp;lt;img alt=&amp;quot;&amp;quot; src=&amp;quot;/Sites/old site/_catalogs/masterpage/testimage.gif&amp;quot; width=&amp;quot;974&amp;quot; height=&amp;quot;69&amp;quot;&amp;gt;&amp;lt;/td&amp;gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;&lt;font style="BACKGROUND-COLOR:#ffffff;"&gt;
&lt;p class="MsoNormal" style="MARGIN:0in 0in 10pt;"&gt;&lt;span style="FONT-SIZE:10pt;BACKGROUND:white;COLOR:black;LINE-HEIGHT:115%;FONT-FAMILY:&amp;#39;Arial&amp;#39;,&amp;#39;sans-serif&amp;#39;;"&gt;If we set the relative URL&amp;nbsp;in both the Notepad and the SharePoint Designer, after the save of master page it&amp;#39;s always not reflecting the relative URL&lt;/span&gt;&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&lt;strong&gt;Resolution&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We replaced the image tag with ASP.NET Image server control&lt;/p&gt;
&lt;p&gt;&lt;font style="BACKGROUND-COLOR:#c0c0c0;" color="#000000"&gt;&amp;lt;asp:Image ImageUrl=&amp;quot;./../../images/testimage.gif&amp;quot; runat=&amp;quot;server&amp;quot;/&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style="BACKGROUND-COLOR:#ffffff;"&gt;This made it to work. Whenever we need to disribute a sharepoint site template with custom master pages, it&amp;#39;s better to use ASP.NET Image control instead of &amp;lt;img&amp;gt; tags&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1489990" width="1" height="1"&gt;</description><category domain="http://msmvps.com/blogs/sundar_narasiman/archive/tags/SharePoint+Customization/default.aspx">SharePoint Customization</category></item></channel></rss>