You'll need to
this.button1 = this.Master.FindControl("UpdatePanel1").FindControl("Button1") as Button;
Here's a blog post to help describe the process. Basically you're drilling down into your controls.
EDIT
Sorry I just re-read your question. The code above will allow you to FIND a Button on your Masterpage from your Content Page codebehind.
It's a little more difficult to execute the Masterpage codebehind method from your content page. A better way might be to a JavaScript event to your button (or just use jQuery), and put the code for a JavaScript modal window in your Masterpage.
<!-- script stuff -->
<script>
$(function() {
$( "#dialog" ).dialog({
autoOpen: false
});
$( "#opener" ).click(function() {
$( "#dialog" ).dialog( "open" );
return false;
});
});
</script>
<!-- end script stuff -->
<!-- dialog div -->
<div id="dialog" title="Basic dialog">
<p>say something meaningful</p>
</div>
<!-- end dialog div -->
<!-- content page stuff -->
<button id="opener">open alert</button>
<!-- end content page stuff-->
HOWEVER
If you're really hooked on calling a masterpage method from your content page, you need to make the method public
Find info in Step 4: Calling the Master Page's Public Members from a Content Page
There are two ways that a content page can programmatically interface with its master page:
- Using the Page.Master property, which returns a loosely-typed reference to the master page, or
- Specify the page's master page type or file path via a @MasterType directive; this automatically adds a strongly-typed property to the page named Master.