locked
VS- Which web form to use? RRS feed

  • Question

  • User-748188285 posted

    I would like Headers and footers to load on first page.

    On 2nd, 3rd, etc pages, I do not want to re-load the headers and footers( since they are the same).

    I just want to load the new info in the Content ( body) of the web page.

    I looked into "web form with Master page" where I had a hidden input textbox in the header section.

    I think that re-loads everytime.

    Under add new item for a project ( which has items like "Web Form","ASP.Net Handler","WCF Service", etc),

    which one(s) would I need to update the "Content" ( body) without reloading the headers and footers ?

    TIA
    shall42

    Tuesday, July 28, 2015 11:04 AM

Answers

  • User2053451246 posted

    Yes the header and footer will reload when navigating to a new page.  You will need to either look into building a Single Page Application (SPA) or loading the content into a <div> on your main page using Ajax.

    <div>Header content...</div>

    <div id="content">Main content... Initial content displays when loading main page.  Use Ajax to load different content instead of navigating to a new page.</div>

    <div>Footer content...</div>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 28, 2015 4:50 PM

All replies

  • User37182867 posted

    This question is hard to understand. Please provide more context. Are you talking about a master page with placeholders for a header and footer? Posting some code would also help clear up any confusion.

    Tuesday, July 28, 2015 3:41 PM
  • User-748188285 posted

    I did use a "web form with a master page" which had headers and footers. During my testing, I think the headers and footers

    were being reloaded. For testing I put a hidden textbox in header. PageA set value of textbox in header. PageB when loaded erased the value

    in the hidden field.

    Tuesday, July 28, 2015 4:07 PM
  • User2053451246 posted

    Yes the header and footer will reload when navigating to a new page.  You will need to either look into building a Single Page Application (SPA) or loading the content into a <div> on your main page using Ajax.

    <div>Header content...</div>

    <div id="content">Main content... Initial content displays when loading main page.  Use Ajax to load different content instead of navigating to a new page.</div>

    <div>Footer content...</div>

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 28, 2015 4:50 PM