ContentPlaceHolderは複数箇所に置けるので、トップ、メイン、サイドバー、フッター、をページごとに差し替えられる。
ContentPlaceHolder クラス (System.Web.UI.WebControls) | Microsoft Learn
ContentPlaceHolder.masterで、
topContent、sideBar、mainContent、footerContentのところにContentPlaceHolderを配置。
ContentPlaceHolder1.aspxは、
ContentPlaceHolder2.aspxは、
と書く。
![ContentPlaceHolder1.aspxにアクセスするとこうなる。](https://cdn-ak.f.st-hatena.com/images/fotolife/B/BG1/20230812/20230812151832.png)
ContentPlaceHolder1.aspxにアクセスするとこうなる。
![ContentPlaceHolder2.aspxだとこうなる。](https://cdn-ak.f.st-hatena.com/images/fotolife/B/BG1/20230812/20230812152034.png)
ContentPlaceHolder2.aspxだとこうなる。