I would on like AJAX on one content page and want to add an UpdatePanel to the MasterPage and wrap a UserControl that is being loaded from the MasterPage in that UpdatePanel all from the ContentPage. Is it possbile to do this? I have some code but it is not working.
protected override void OnPreInit( EventArgs e )
{
ScriptManager sm = new ScriptManager();
sm.ID = "ScriptManager1";
Master.Controls.Add( sm );
UpdatePanel panel = new UpdatePanel();
panel.ID = "upMaster";
panel.ContentTemplateContainer.Controls.Add( this.Controls[0] );
AsyncPostBackTrigger trig = new AsyncPostBackTrigger();
trig.ControlID = "btnDelete";
trig.EventName = "Click";
panel.Triggers.Add( trig );
Master.Controls.Add( panel );
base.OnPreInit( e );
}