In ASP.NET content pages are attached to a master page through master page inheritance. A master page in this context acts as a template defining the structure and elements of the website. Content pages contain page content like text, images, and interactive elements. The “MasterPageFile” attribute is used to specify a master page which a content page is inheriting from thus establishing a relationship.