Home > front end >  how to add footer to html pages from site.master page
how to add footer to html pages from site.master page

Time:12-22

I have footer section added in the site.master (aspx) page so all my aspx pages will have the same footer. However, my site contains some html pages as well. I have to manually copy the html/bootstrap code from the footer section and paste it in all the html pages. Whenever I make a small change to the footer, i have to repeat the same across all HTML pages. Is there a way to simplify this process instead of having to do this manually

THank you

CodePudding user response:

You can create footer.html and use iframe in your main html pages; as well as in your master page. For every modification you will need to modify footer.html

<body>
     Content.
     <iframe src="footer.html"></iframe>
</body>

CodePudding user response:

You can use footerContent

<div id="footerContent" style="text-align:center">
     <b>Powered by ASP.NET! </b>
</div>
  • Related