Hey there guys, i have posted a few time on this with no reply to my posts. Here goes my last attempt at finding a answer to this question.
I have a master page... On this MasterPage i have a user control (ascx file) and ofcourse my Default.aspx page as my content area... My Default.aspx page has a control on it that i need to access on my User Controls code behind.
As a side note, there is AJAX being used here...
This is my MasterPage:
--------------------------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
--
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.maste
r.cs" Inherits="MasterPage" %>
<%@ Register TagPrefix="MNU" TagName="MainMenu" Src="sitemenu.ascx" %>
<html xmlns="
http://www.w3.org/1999/xhtml"
>
<head runat="server">
<title></title>
</head>
<body>
<div style="width:100%; height:100%; margin-top:0px; text-align:center">
<center>
<form id="frmResCom" runat="server" style="margin:0px">
<MNU:MainMenu ID="Menu1" runat="server" />
<asp:contentplaceholder id="ContentPlaceHolder1" runat="server"></asp:conte
ntplacehol
der>
</form>
</center>
</div>
</body>
</html>
--------------------------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
--
This is my Default.aspx page that holds the control i am trying to find:
--------------------------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
--
<%@ Page Language="C#" MasterPageFile="~/MasterPa
ge.master"
Trace="true" AutoEventWireup="true" CodeFile="Default.aspx.cs"
Inherits="_Default" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Cont
entPlaceHo
lder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<asp:Label ID="ContentLBL" runat="server"></asp:Label
>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
--------------------------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
--
And this is my User Control code behind where i am trying to find the contol on the Default.aspx page:
--------------------------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
--
public void ImageButton_Command(object
sender, CommandEventArgs e)
{
UpdatePanel updatepan = new UpdatePanel();
updatepan = (UpdatePanel)Page.FindCont
rol("Updat
ePanel2");
...
--------------------------
----------
----------
----------
----------
----------
----------
----------
----------
----------
----------
--
Please please please someone help me get access to my UpdatePanel on the default.aspx page from my codebehind of my user control. Please!
Nugs