<p>I have a <code>BasePage</code> which inherits from <code>System.Web.UI.Page</code>, and every page that inherits the <code>BasePage</code> will have the same master page.</p>

<p>How do I cast the <code>Page.Master</code> of the <code>BasePage</code> to the specific master page so I can access properties on it?</p>

In VB.Net
```
```
MasterPageVariable = Ctype(page.MasterPage, MasterPageClass)
```
```