locked
HTML title changed on Navigation pages RRS feed

  • Question

  • Hello,

     I have implemented navigation in my application. I have set HTML title in aspx page. But when xap donloads its overwrite my title and displayed title as path. I can set title in Page by Title property. But there are so many pages and my title is constant. So that I have to set it for each page. I dont wnat to set for every page. Want to achieve this at single shot.

    so please how can i do that.

     

    Thanks,

    Raj

    Wednesday, February 2, 2011 12:38 AM

Answers

  • I had the same issue like yours:

    I solved the problem as mentioned below ->

    create a event for the Content Frame "ContentFrame_Navigated" and inside that use the following lines of codes:

    var document = HtmlPage.Document;
    document.SetProperty("title", "Your Fixed Title");

    It will solve your problem.

    Wednesday, February 2, 2011 7:14 AM

All replies

  • Hi Raj. I don't think there's a built-in switch for that. What I can think of is derive from page, set the title to a constant string in your custom page and then derive all your pages from that custom class. That should work, but it's probably more work to change the base class for each page than to simply set the title.

    Another possibility would be to handle the navigation events of the frame and set the title of the new page from there dynamically (e.g. in the Navigated event get the current page and change its title).


    Wednesday, February 2, 2011 3:50 AM
  • I had the same issue like yours:

    I solved the problem as mentioned below ->

    create a event for the Content Frame "ContentFrame_Navigated" and inside that use the following lines of codes:

    var document = HtmlPage.Document;
    document.SetProperty("title", "Your Fixed Title");

    It will solve your problem.

    Wednesday, February 2, 2011 7:14 AM