multi lang. site with master page - page title problem

Last post 05-09-2008 11:33 AM by TOMCIO. 2 replies.

Sort Posts:

  • multi lang. site with master page - page title problem

    05-08-2008, 11:03 PM
    • Loading...
    • TOMCIO
    • Joined on 07-12-2003, 6:19 AM
    • Chicago
    • Posts 449

    my master page takes Title from resource file based on lang. ver

    <title>

    <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Resources, mp_title %>"></asp:Literal>

    </title>

    Works perfect on all pages, but now on "product details page" i want to change title to the name of the product.
    in page load :

    page.title = "New Page title"

    doesn't work. When i change title in master page to some static text , everything works

     

     

     

     

  • Re: multi lang. site with master page - page title problem

    05-09-2008, 10:22 AM

    It might just be an event ordering thing (I can't remember when the page title is actually set). Try moving your code that changes the title from the Page_Load event to Page_PreRender event.

  • Re: multi lang. site with master page - page title problem

    05-09-2008, 11:33 AM
    • Loading...
    • TOMCIO
    • Joined on 07-12-2003, 6:19 AM
    • Chicago
    • Posts 449

    no, it did not help.

    i think it is because this (in masterpage):
     

    <title>

    <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Resources, mp_title %>"></asp:Literal>

    </title>

    when i change it to static text, and then try to change title in page load event works ok.

Page 1 of 1 (3 items)