Even though I followed carefully every step, in the end, the only thing I can see in my home page is a directory listing ... I can't figure out why don't I get the same result, I can also say that downloading the code for this sample project, and executing
on the same machine seems to work. The warning I got when I tried to open this sample project was that it was compiled for .NET 2.0 and it had to be upgraded to .NET 3.5, which it did and it worked.
So, is there any setting I may have set differently than what the creator of the sample project might have? Is there anything I should check right from the start?
Could this be happening because I created my Default.master after most of the other pages?
Do you mean that your menu only shows the dirctories as tabs but no lower level pages?
All pages should be linked through the master page. Everytime you add a new page you have a choice to select the master page to link it to or you can do it through the page directive.
MasterPageFile="~/Default.master"
I briefly watched the video and I didn't see this mentioned but the source code(c#) does have all pages linked tothe master page. If you create a new page without linking it, it doesn't have the page directive or the content placeholder inserted into it.
thank you very much. I created all pages before adding the Master page and now I realize I did not know how this Master page is working at all. It seems all content pages do not have any html tags in them because everything goes through the Master. Now
I am debating if this is really what I need since my different pages should have their own style ... I do not anticipate there are going to be lots of pages so I guess the Master page won't do too much for me - in any case I should probably have nested Master
pages and I don't know how much trouble this could be ...
Yeah, master pages work best when you have a header, menu and footer that will be the same through out your website. You still get the ability to apply javascript and css styles to the nested pages.
kowalsky
Member
69 Points
54 Posts
site navigation not working
Nov 09, 2010 10:41 PM|LINK
hi all,
I have tried to build my own site with navigation as seen in the video under the link below:
http://www.asp.net/general/videos/how-do-i-implement-site-navigation-in-aspnet
Even though I followed carefully every step, in the end, the only thing I can see in my home page is a directory listing ... I can't figure out why don't I get the same result, I can also say that downloading the code for this sample project, and executing on the same machine seems to work. The warning I got when I tried to open this sample project was that it was compiled for .NET 2.0 and it had to be upgraded to .NET 3.5, which it did and it worked.
So, is there any setting I may have set differently than what the creator of the sample project might have? Is there anything I should check right from the start?
Could this be happening because I created my Default.master after most of the other pages?
thanks,
kowalsky
devinmccloud
Member
470 Points
151 Posts
Re: site navigation not working
Nov 10, 2010 02:27 AM|LINK
Do you mean that your menu only shows the dirctories as tabs but no lower level pages?
All pages should be linked through the master page. Everytime you add a new page you have a choice to select the master page to link it to or you can do it through the page directive.
MasterPageFile="~/Default.master"
I briefly watched the video and I didn't see this mentioned but the source code(c#) does have all pages linked tothe master page. If you create a new page without linking it, it doesn't have the page directive or the content placeholder inserted into it.
kowalsky
Member
69 Points
54 Posts
Re: site navigation not working
Nov 11, 2010 02:23 PM|LINK
Jer,
thank you very much. I created all pages before adding the Master page and now I realize I did not know how this Master page is working at all. It seems all content pages do not have any html tags in them because everything goes through the Master. Now I am debating if this is really what I need since my different pages should have their own style ... I do not anticipate there are going to be lots of pages so I guess the Master page won't do too much for me - in any case I should probably have nested Master pages and I don't know how much trouble this could be ...
Thanks again,
kowalsky
devinmccloud
Member
470 Points
151 Posts
Re: site navigation not working
Nov 13, 2010 06:02 AM|LINK
Yeah, master pages work best when you have a header, menu and footer that will be the same through out your website. You still get the ability to apply javascript and css styles to the nested pages.