Expression > Página Inicial dos Fóruns > Expression Web and SuperPreview > ASP.NET Navigation Controls using .master pages
Fazer uma PerguntaFazer uma Pergunta
 

RespondidoASP.NET Navigation Controls using .master pages

  • sexta-feira, 3 de julho de 2009 21:36ctctc Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    I am creating a new simple web site using EW0 sp1.

    I have created a main.master page, a default.aspx page based upon the .master, several child.aspx pages based upon the .master, and a Web.sitemap file describing my desired navigation structure saved to the root of the web. I have added to the main.master page the ASP.NET menu navigation control to a div (which is not set to be a ContentPlaceHolder) and created new and chose a SiteMapDataSource1.

    Should I rename all of the default "title(s)" on each of the pages (which by default all currently read the same "Archi-Build") to a unique name for each page and then type those unique titles into the web.sitemap file? Ex: <%@ Page masterpagefile="main.master" language="C#" title="Archi-Build" %> would be changed to <%@ Page masterpagefile="main.master" language="C#" title="Architecture" %> and so on...

    Needless to say, when I do this and preview the Default.aspx page in a browser, the menu displays the title of the main.master page "main" but doesn't react to a mouse click. The same problem occurs if I do not rename all of the pages and list the same default title in the Web.sitemap.

Respostas

  • segunda-feira, 6 de julho de 2009 18:52ctctc Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Respondido

    Should I rename all of the default "title(s)" on each of the pages (which by default all currently read the same "Archi-Build") to a unique name for each page and then type those unique titles into the web.sitemap file? Ex: <%@ Page masterpagefile="main.master" language="C#" title="Archi-Build" %> would be changed to <%@ Page masterpagefile="main.master" language="C#" title="Architecture" %> and so on...


    Thanks for your reply. I found these answers after combing through the forum you suggested.

    No, do not rename the "title" on your web pages created using a .master page. The "title" that appears on the top of these pages refers to the master page, not the page created using it. (presumably these pages do not have a "title" of their own?)

    The "title" for each page in the web.sitmap file is different from the .master title. You make these up for what you want to have appear in the menu, sitemappath, or treeview.
    • Marcado como Respostactctc segunda-feira, 6 de julho de 2009 18:52
    •  

Todas as Respostas

  • sexta-feira, 3 de julho de 2009 22:42Preston B Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Here's a resource at the MS Asp.Net Forum:

    Master Pages, Themes and Navigation Controls 

    -Preston


    Columbia, CA. USA http://www.gildedmoon.com
  • sexta-feira, 3 de julho de 2009 22:47KathyW2 Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    Preston, not sure where that link was intended to go, but it doesn't lead anywhere with the subject content.
  • sexta-feira, 3 de julho de 2009 22:55Preston B Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    The edit window showed a blank page so I can't fix it. Arrgh! Here's the link...

    Master Pages, Themes and Navigation Controls:   http://forums.asp.net/139.aspx

    Sorry for the confusion.

    -Preston


    Columbia, CA. USA http://www.gildedmoon.com
  • sexta-feira, 3 de julho de 2009 23:24KathyW2 Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    "The edit window showed a blank page so I can't fix it."

    That's been randomly happening for me, too.  Must have been the latest forum upgrade :)
  • sábado, 4 de julho de 2009 1:15Cheryl D WiseMVPMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     

    The last forum "upgrade" broke many things. I can't tell you how many posts of mine that have disappeared into the ether.


    MS MVP Expression Tutorials & Help http://by-expression.com and online instructor led Expression Classes
  • sábado, 4 de julho de 2009 1:22Bill Pearson Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     
    The blank window fixes itself after a few minutes. If you try to edit soon after a post, it'll be blank. Come back later and it's fine. A new feature, surely.
  • segunda-feira, 6 de julho de 2009 18:52ctctc Medalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuárioMedalhas de usuário
     Respondido

    Should I rename all of the default "title(s)" on each of the pages (which by default all currently read the same "Archi-Build") to a unique name for each page and then type those unique titles into the web.sitemap file? Ex: <%@ Page masterpagefile="main.master" language="C#" title="Archi-Build" %> would be changed to <%@ Page masterpagefile="main.master" language="C#" title="Architecture" %> and so on...


    Thanks for your reply. I found these answers after combing through the forum you suggested.

    No, do not rename the "title" on your web pages created using a .master page. The "title" that appears on the top of these pages refers to the master page, not the page created using it. (presumably these pages do not have a "title" of their own?)

    The "title" for each page in the web.sitmap file is different from the .master title. You make these up for what you want to have appear in the menu, sitemappath, or treeview.
    • Marcado como Respostactctc segunda-feira, 6 de julho de 2009 18:52
    •