Search code examples
asp.nettwitter-bootstrapmaster-pages

Bootstrap button on master page doesn't shows up on content page


I dont know what I am doing wrong but a simple bootstrap button on master page doesnt shows up in content page. I am including the right css on header of master page.

My master page looks like this enter image description here

and content page looks like this

enter image description here

I don't understand what I am missing here.


Solution

  • The ContentPlaceHolder in the MasterPage gets entirely replaced by the Content specified in the page. That anchor tag you added to the master page is just getting overwritten.

    To solve this, either

    1. Move the anchor tag outside of the ContentPlaceHolder on the MasterPage, making it visible on all pages that use the masterpage, or
    2. Move the anchor tag inside the Content tag on the page, making it visible on this page only.