<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/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>Master Pages, Themes and Navigation Controls</title><link>http://forums.asp.net/139.aspx</link><description>Discussions of MasterPages, Themes, and other page-related features. &lt;A href="http://aspadvice.com/SignUp/list.aspx?l=164&amp;amp;c=30" target=_blank&gt;Email List&lt;/A&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: PROBLEM USING MASTER PAGE IN SUBFOLDERS</title><link>http://forums.asp.net/thread/3426775.aspx</link><pubDate>Sat, 26 Sep 2009 13:48:18 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3426775</guid><dc:creator>supaflydude</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3426775.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=3426775</wfw:commentRss><description>&lt;p&gt;An old topic I know, but I&amp;#39;ve just had a similar problem which was caused the directory settings.&lt;/p&gt;&lt;p&gt;I found the solution in this article: &lt;a href="http://robroun.com/2009/09/cant-access-master-page-from-sub-directory/"&gt;ASP.NET: cant access master page from sub directory&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: PROBLEM USING MASTER PAGE IN SUBFOLDERS</title><link>http://forums.asp.net/thread/3077355.aspx</link><pubDate>Thu, 09 Apr 2009 23:10:52 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3077355</guid><dc:creator>sonic20x</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3077355.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=3077355</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I had a somewhat same problem and found a solution by using this site.&lt;/p&gt;&lt;p&gt;http://www.asp.net/learn/master-pages/tutorial-04-vb.aspx &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: PROBLEM USING MASTER PAGE IN SUBFOLDERS</title><link>http://forums.asp.net/thread/2383802.aspx</link><pubDate>Tue, 27 May 2008 19:03:10 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2383802</guid><dc:creator>happyfirst</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2383802.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=2383802</wfw:commentRss><description>&lt;p&gt;I do set it there. But I also have one set in the page attribute of the aspx page (so I could use design time editor) and I need to ensure that that version is ALSO available since it seems the .net internals are validating that that master page exists before the preinit event is called.&lt;/p&gt;</description></item><item><title>Re: PROBLEM USING MASTER PAGE IN SUBFOLDERS</title><link>http://forums.asp.net/thread/2382734.aspx</link><pubDate>Tue, 27 May 2008 11:48:13 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2382734</guid><dc:creator>pradipd.mst</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2382734.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=2382734</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;u can set u r master page on preint&amp;nbsp; event dyanamicaly.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: PROBLEM USING MASTER PAGE IN SUBFOLDERS</title><link>http://forums.asp.net/thread/2382174.aspx</link><pubDate>Tue, 27 May 2008 07:59:05 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2382174</guid><dc:creator>DBMaster</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2382174.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=2382174</wfw:commentRss><description>&lt;p&gt;Here is your solution. Sorry I am late, Because I have found a solution at one site.&lt;/p&gt;
&lt;p&gt;that really works&lt;/p&gt;
&lt;p&gt;Part -1 &lt;br /&gt;&lt;a href="http://blog.joggee.com/?p=134"&gt;http://blog.joggee.com/?p=134&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Part -2&lt;br /&gt;&lt;a href="http://blog.joggee.com/?p=159"&gt;http://blog.joggee.com/?p=159&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;you should have a look and please leave the comments that give moderator motivation.&lt;/p&gt;
&lt;p&gt;DBMASter&lt;/p&gt;</description></item><item><title>Re: PROBLEM USING MASTER PAGE IN SUBFOLDERS</title><link>http://forums.asp.net/thread/2344325.aspx</link><pubDate>Wed, 07 May 2008 23:53:03 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2344325</guid><dc:creator>canalso</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2344325.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=2344325</wfw:commentRss><description>&lt;p&gt;You can try using ./MasterPages/MasterPage1.master&amp;nbsp;&amp;nbsp;&amp;nbsp; ( single dot )&lt;/p&gt;
&lt;p&gt;instead of these ../MasterPages/MasterPage1.master &lt;/p&gt;
&lt;p&gt;or &lt;/p&gt;
&lt;p&gt;~/MasterPages/MasterPage1.master.&lt;/p&gt;</description></item><item><title>Re: PROBLEM USING MASTER PAGE IN SUBFOLDERS</title><link>http://forums.asp.net/thread/2343077.aspx</link><pubDate>Wed, 07 May 2008 13:40:29 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2343077</guid><dc:creator>DBMaster</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2343077.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=2343077</wfw:commentRss><description>&lt;p&gt;Hi found good article at here with example try this out.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.joggee.com/?p=134"&gt;http://blog.joggee.com/?p=134&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blog.joggee.com/?p=159"&gt;http://blog.joggee.com/?p=159&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: PROBLEM USING MASTER PAGE IN SUBFOLDERS</title><link>http://forums.asp.net/thread/2180340.aspx</link><pubDate>Mon, 18 Feb 2008 17:59:10 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2180340</guid><dc:creator>Strupi</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2180340.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=2180340</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Beyondard and all,&lt;/p&gt;&lt;p&gt;Recommend Scott Mitchel&amp;#39;s excellent article at&amp;nbsp;&amp;nbsp; http://aspnet.4guysfromrolla.com/articles/052505-1.aspx&amp;nbsp;&lt;/p&gt;&lt;p&gt;It appears that the Page.ResolveUrl() method he describes at the bottom of his article may be a one size fits all solution to all these problems.&amp;nbsp; I have not tried it yet. &lt;/p&gt;&lt;p&gt;So the solution to your problem, Beyondard, may be&amp;nbsp;&amp;nbsp; &lt;/p&gt;&lt;p&gt;text = &amp;lt;%=Page.ResolveUrl(&amp;quot;~/scripts/filename.js&amp;quot;) %&amp;gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;or something like it.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: PROBLEM USING MASTER PAGE IN SUBFOLDERS</title><link>http://forums.asp.net/thread/2180191.aspx</link><pubDate>Mon, 18 Feb 2008 16:35:41 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2180191</guid><dc:creator>Beyondard</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2180191.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=2180191</wfw:commentRss><description>&lt;p&gt;Strupi,&lt;/p&gt;&lt;p&gt;&amp;nbsp;thanks for that, I was looking on how to do that myself. however I still have trouble with linking external .js files in the head. how can I go about doing that?&lt;/p&gt;&lt;p&gt;currently, I have a URL variable in the web.config and I&amp;#39;m using &amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;src=&amp;#39;&amp;lt;&lt;span class="tag"&gt;asp:Literal&lt;/span&gt;&lt;span class="attr"&gt; runat=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;server&amp;quot;&lt;/span&gt;&lt;span class="attr"&gt; text=&lt;/span&gt;&lt;span class="attrv"&gt;&amp;quot;&lt;span class="dir"&gt;&amp;lt;%$&lt;/span&gt; AppSettings: URL &lt;span class="dir"&gt;%&amp;gt;&lt;/span&gt;&amp;quot;&lt;/span&gt;/&amp;gt;filename.js&amp;#39;&lt;/pre&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;to make the reference work even in sub folders. However, this can be troublesome in case someone cannot resolve the domain name of the server and is using the IP address or host name. is there a better way to do it?&lt;br /&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: PROBLEM USING MASTER PAGE IN SUBFOLDERS</title><link>http://forums.asp.net/thread/2179806.aspx</link><pubDate>Mon, 18 Feb 2008 13:30:52 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2179806</guid><dc:creator>happyfirst</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2179806.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=2179806</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;ylDave:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;Good writeup happyfirst.&amp;nbsp; That is the same issue I&amp;#39;m seeing - the&amp;nbsp;discrepancy between how master page file paths are getting resolved at runtime and at design time; probably a question / bug for Microsoft.&amp;nbsp; It is unclear whether it is the same issue for antsy pants since we don&amp;#39;t have enough info on how his references are set up.&amp;nbsp; I&amp;#39;ll post elsewhere and see if I can find an answer.&amp;nbsp; 
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Thanks. I hope we find a resolution besides having to leave out the MasterPageFile setting from the aspx. I initially though antsy probem was same since he referenced linking the master page and moving the master page.&lt;/p&gt;</description></item><item><title>Re: PROBLEM USING MASTER PAGE IN SUBFOLDERS</title><link>http://forums.asp.net/thread/2179799.aspx</link><pubDate>Mon, 18 Feb 2008 13:27:18 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2179799</guid><dc:creator>happyfirst</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2179799.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=2179799</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;Strupi:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;was responding to Anty.Panty&amp;#39;s problem at the top of this page.&amp;nbsp; You have a different problem and need to post a new thread to get a response.&amp;nbsp; To do that, click on the Master Pages, Themes and Navigation Controls in the breadcrumb at the top of this page. That will take you to a page where you can post a new question.&amp;nbsp; &lt;img alt="Wink" src="http://forums.asp.net/emoticons/emotion-5.gif" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;I did post another thread but nobody has replied to that and then I saw this thread where another user was describing the same problem. Here&amp;#39;s my initial thread: &lt;a href="http://forums.asp.net/t/1219593.aspx"&gt;&lt;font color="#5403fa"&gt;http://forums.asp.net/t/1219593.aspx&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: PROBLEM USING MASTER PAGE IN SUBFOLDERS</title><link>http://forums.asp.net/thread/2178915.aspx</link><pubDate>Mon, 18 Feb 2008 04:59:01 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2178915</guid><dc:creator>ylDave</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2178915.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=2178915</wfw:commentRss><description>&lt;p&gt;Good writeup happyfirst.&amp;nbsp; That is the same issue I&amp;#39;m seeing - the&amp;nbsp;discrepancy between how master page file paths are getting resolved at runtime and at design time; probably a question / bug for Microsoft.&amp;nbsp; It is unclear whether it is the same issue for antsy pants since we don&amp;#39;t have enough info on how his references are set up.&amp;nbsp; I&amp;#39;ll post elsewhere and see if I can find an answer.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Dave&lt;/p&gt;</description></item><item><title>Re: PROBLEM USING MASTER PAGE IN SUBFOLDERS</title><link>http://forums.asp.net/thread/2178778.aspx</link><pubDate>Mon, 18 Feb 2008 03:17:31 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2178778</guid><dc:creator>Strupi</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2178778.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=2178778</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Reply to HappyFirst:&lt;/p&gt;&lt;p&gt;I was responding to Anty.Panty&amp;#39;s problem at the top of this page.&amp;nbsp; You have a different problem and need to post a new thread to get a response.&amp;nbsp; To do that, click on the Master Pages, Themes and Navigation Controls in the breadcrumb at the top of this page. That will take you to a page where you can post a new question.&amp;nbsp; &lt;img src="http://forums.asp.net/emoticons/emotion-5.gif" alt="Wink" /&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: PROBLEM USING MASTER PAGE IN SUBFOLDERS</title><link>http://forums.asp.net/thread/2178729.aspx</link><pubDate>Mon, 18 Feb 2008 02:30:54 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2178729</guid><dc:creator>happyfirst</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2178729.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=2178729</wfw:commentRss><description>&lt;p&gt;This issue is NOT about a problem with the hyperlinks&amp;nbsp;in the&amp;nbsp;pages. They all work properly as long as they are server controls as you stated. The designer will show them in error that they don&amp;#39;t exist though because I am including the module subdirectory in the path.&lt;/p&gt;
&lt;p&gt;I have a web application project hosted via IIS virtual directory and application at localhost\mainsite\.&lt;/p&gt;
&lt;p&gt;I also have a module that&amp;#39;s ANOTHER web application project hosted as IIS virtual directory ( but NOT application )&amp;nbsp;at localhost\mainsite\core.&lt;/p&gt;
&lt;p&gt;ALL of my user controls and pages are in core.&amp;nbsp;Their hyperlinks work just fine whether I grab the master page template from&amp;nbsp;locahost\mainsite\templates OR localhost\mainsite\core\templates. &amp;nbsp;If I leave the MasterPageFile setting in my core pages as ~/templates/pages/main.master then I can edit the page in the designer and VS&amp;nbsp;resolves ~ to the virtual directory for the core1 directory. When I RUN the app however, .net runtime is resolving ~ to the mainsite directory so I have to have my templates ALSO in locahost\mainsite\templates&amp;nbsp;or .net throws an exception about the templates missing. The problem is this is WRONG as I&amp;#39;m going to switch the template in PreInit but the code doesn&amp;#39;t get that far. It&amp;#39;s verifying the MasterPageFile setting stored in the aspx page. Personally, I think that I should be setting my MasterPageFile setting to ~/core/templates/pages/main.master in my core aspx pages. But I can&amp;#39;t since VS resolves ~ differently than at runtime.&lt;/p&gt;
&lt;p&gt;So I basically have to remove the MasterPageFile setting from the aspx pages so that I can truly choose where I want to load the masterpagefile from at runtime. But then I loose designer editting.&lt;/p&gt;
&lt;p&gt;There are basically two bugs here.&lt;/p&gt;
&lt;p&gt;1) .net should not verify that the masterpagefile exists UNTIL AFTER preinit.&lt;/p&gt;
&lt;p&gt;2) What should &amp;#39;~&amp;#39; resolve to for a nested website application project. I think VS is doing the wrong thing. ~ should resolve to localhost\mainsite in the core project. It should not include the core directory in the path since it&amp;#39;s not an application. If anything, VS project settings should allow us to override what ~ resolves to at designtime.&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: PROBLEM USING MASTER PAGE IN SUBFOLDERS</title><link>http://forums.asp.net/thread/2177166.aspx</link><pubDate>Sat, 16 Feb 2008 05:15:30 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2177166</guid><dc:creator>Strupi</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2177166.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=139&amp;PostID=2177166</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hi,&lt;br /&gt;&lt;br /&gt;I am not sure that I understand your problem.&amp;nbsp; A common problem is when a masterpage is in the root folder and you try to use it from an aspx page in a subfolder.&amp;nbsp; In such a case, all the links on the masterpage will fail unless they are run on the server.&amp;nbsp; So they have to be converted from HTML code to server controls.&amp;nbsp; Here is how that is done.&lt;br /&gt;&lt;br /&gt;TO FIX LINK TO STYLES IN A STYLES FOLDER&lt;br /&gt;Simply add the runat=&amp;quot;server&amp;quot; property to the &amp;lt;head&amp;gt; tag&lt;/p&gt;&lt;p&gt;Example:&lt;br /&gt;&lt;br /&gt;&amp;lt;head runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;link href=&amp;quot;styles/MyStyleSheet.css&amp;quot; rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; /&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;TO FIX IMAGES:&lt;br /&gt;Use the &amp;lt;asp:Image tag.&lt;/p&gt;&lt;p&gt;Example:&lt;br /&gt;&lt;br /&gt;&amp;lt;asp:image Id=&amp;quot;Image13&amp;quot;&amp;nbsp; runat=&amp;quot;server&amp;quot; ImageUrl=&amp;quot;~/images/walkingholidays.jpg&amp;quot; alternateText=&amp;quot;Walking Holidays&amp;quot; width=&amp;quot;192&amp;quot; height=&amp;quot;77&amp;quot; borderwidth=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;&lt;br /&gt;NOTE: Look very closly at ALL the wording.&amp;nbsp; You need the ID=, runat=&amp;quot;server&amp;quot;, ImageUrl =, the tilde (~) before the path and the alt property must be spelled out (AlternateText=) and border is now &amp;quot;borderwidth.&amp;quot;&amp;nbsp; Any departure from this wording will screw you up. To find out more about this tag, go to the help menu in VWD and search for &amp;lt;asp:image in the index.&lt;br /&gt;&lt;br /&gt;TO FIX ANCHOR TAGS:&lt;br /&gt;Add an Id= property and the runat=&amp;quot;server&amp;quot; property. Note that there is no tilde (~) before the path as there is in the above image example.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Example:&lt;/p&gt;&lt;p&gt;&amp;lt;a Id=&amp;quot;A1&amp;quot;&amp;nbsp; href = &amp;quot;Pages/Calendar.aspx&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;CALENDAR&amp;lt;/a&amp;gt;&lt;br /&gt;&lt;br /&gt;All of these examples assume that the MasterPage is in the root directory.&lt;br /&gt;&lt;br /&gt;Jim Webber, Sacramento&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>