In my example I've used a master page to create a website that will support navigation for multiple languages (English - French - Dutch). It's not a typical example for using master pages, but it shows you how you can change your master page at run-time and support for multiple languages is almost always required for Belgian websites. Belgium has three official languages : French, Dutch and German ... but English is most of the time used for general communication in the bigger companies. English has become the "working" language in Belgium. Yip, strange behavior for a country with a population of only 10 million people!
The website contains only 1 aspx-page (Default.aspx) that is based on 1 master page (MyMasterPage.master). At the end, the page will be able to display content in English, French and Dutch and will disable the hyperlink for the current language.
The master page contains three "Hyperlink"-controls and a body-ContentPlaceHolder. All three links refer to the same aspx-page with a different Querystring.
The aspx-page is linked to the MyMasterPage and a heading 2 is entered into the ContentPlaceHolder-block.
The CodeFile for the master page contains a public method for disabling a hyperlink according to the language-parameter.
In the Page_Load method in the CodeFile for the aspx-page, the language is set (default = English), the "DisableLink" method is called and the Title + Header is properly set.
This is only a very simple example of how you can alter a master page at run-time, but it's very powerfull because it lets you change each server-control that's created in your master page. You can also work with properties on your master page instead of with public methods.