tag:blogger.com,1999:blog-30174199.post115112426297031153..comments2008-11-18T20:43:34.755-08:00Comments on OCEG Technology Blog: ASP.NET 2.0 themes URL mappingStephane Legayhttp://www.blogger.com/profile/01593730213717050672noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-30174199.post-1152823506998327232006-07-13T13:45:00.000-07:002006-07-13T13:45:00.000-07:002006-07-13T13:45:00.000-07:00Unfortunately I don't think you can do any kind of...Unfortunately I don't think you can do any kind of direct server processing on client templates. <BR/><BR/>But here's an easy workaround...<BR/><BR/>Set the image folder as a javascript variable (add % characters around the Response server script - Blogger doesn't accept server scripts):<BR/><BR/>var GridClientTemplateImagePath = 'App_Themes/< Response.Write(Page.Theme);>/Images/Grid/'; <BR/><BR/>Modify your client template to use that variable when compiling the file path:<BR/><BR/>src="images/## GridClientTemplateImagePath ##test.gif" width="8" height="10" border="0"<BR/><BR/>Other Option - Server Template<BR/><BR/>Create a server rather than client template. In the server template, use an Image WebControl rather than an html img tag. Create a skin for the image, define an ImageUrl relative to the Themes folder (Images/Grid/test.gif for an image located in ~/App_Themes/Images/Grid/test.gif). Set the Image control instance SkinID attribute to the new SkinID.Stephane Legayhttp://www.blogger.com/profile/01593730213717050672noreply@blogger.comtag:blogger.com,1999:blog-30174199.post-1152818736399937922006-07-13T12:25:00.000-07:002006-07-13T12:25:00.000-07:002006-07-13T12:25:00.000-07:00This modification work for client template to for ...This modification work for client template to for UI 2006?<BR/><BR/>The problem I have is if I set the correct path for the ImageBasePath property in thge skin file, and then I use /Grid/test.gif in one of my client template (in this skin file) he just do that:<BR/>http://mywebsite/curentpagelocation/Grid/test.gif insted of https://mywebsite/App_Themes and so on...Pierrehttp://www.blogger.com/profile/04719383492712821913noreply@blogger.com