Problem with AJAX TabContainer

Hello Experts,

I have a page the has AJAX Tab containers.. in some tab containers there will be child tabs with User controls being loaded dynamicly in to placeholders.. the issue I am having is the first 3 tabs panels are working fine but every tab panel after is not working what is the problem I have spen two days trying to resolve this issue.. please help..
Small_BallsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

carlnorrbomCommented:
Hi,
It would help if You could provide the code.
/Carl.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Small_BallsAuthor Commented:
ok


DetailsForm.aspx
 
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DetailsForm.aspx.cs" Inherits="Applications_xDynamics_Forms_DetailsForm" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/Applications/xDynamics/Controls/Forms/View/ViewCustomer.ascx"
    TagName="ViewCustomer" TagPrefix="EOI" %>
<%@ Register Src="~/Applications/xDynamics/Controls/Forms/Edit/EditCustomer.ascx"
    TagName="EditCustomer" TagPrefix="EOI" %>
<%@ Register Src="~/Applications/xDynamics/Controls/Forms/View/ViewEOIEnquries.ascx"
    TagName="ViewEOIEnquriy" TagPrefix="EOI" %>
<%@ Register Src="~/Applications/xDynamics/Controls/Forms/View/ViewEOI.ascx" TagName="ViewEOI"
    TagPrefix="EOI" %>
<%@ Register Src="~/Applications/xDynamics/Controls/Forms/View/ViewCustCalls.ascx"
    TagName="ViewCustCalls" TagPrefix="Calls" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
    </style>
</head>
 
<script type="text/javascript">
    function GetRadWindow() {
        var oWindow = null;
        if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog  
        else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)  
 
        return oWindow;
    }
    function CloseWnd() {
        GetRadWindow().close();
    }
 
    function RowSelected(row) {
 
    }
 
    function OnChanged(sender, args) {
        sender.get_clientStateField().value = sender.saveClientState();
    }
</script>
 
<body class="BodyContent">
    <form id="form1" runat="server">
    <div>
        <ajaxToolkit:TabContainer ID="TabContainer1" runat="server" OnClientActiveTabChanged="OnChanged"
            ActiveTabIndex="0">
            <ajaxToolkit:TabPanel ID="tpCustomerDetails" runat="server">
                <HeaderTemplate>
                    Customer Info
                </HeaderTemplate>
                <ContentTemplate>
                    <ajaxToolkit:TabContainer ID="TabContainer2" runat="server" OnClientActiveTabChanged="OnChanged"
                        ActiveTabIndex="0" CssClass="">
                        <ajaxToolkit:TabPanel ID="tpCustInfo" runat="server">
                            <HeaderTemplate>
                                Customer Info
                            </HeaderTemplate>
                            <ContentTemplate>
                                <ajaxToolkit:Accordion ID="AccordinCustomerDetails" runat="server" SelectedIndex="0"
                                    HeaderCssClass="accordionHeaderDeselected" HeaderSelectedCssClass="accordionHeaderSelected"
                                    ContentCssClass="accordionContent" FadeTransitions="false" FramesPerSecond="40"
                                    TransitionDuration="250" AutoSize="None" RequireOpenedPane="false" SuppressHeaderPostbacks="true">
                                    <Panes>
                                        <ajaxToolkit:AccordionPane ID="AccordionPane13" runat="server">
                                            <Header>
                                                <a href="" style="text-decoration: none">Customers Details</a>
                                            </Header>
                                            <Content>
                                                <EOI:ViewCustomer ID="controlViewCust" runat="server" />
                                                <EOI:EditCustomer ID="controlEditCust" runat="server" Visible="false" />
                                                <table style="width: 100%;">
                                                    <tr>
                                                        <td>
                                                            <asp:Button ID="Button1" Visible="false" runat="server" OnClick="LinkButton2_Click"
                                                                Text="Edit" />
                                                            <asp:Button ID="btnCloseEdit" Visible="false" runat="server" OnClick="btnCloseEdit_Click"
                                                                Text="Close Edit" />
                                                            <asp:Button ID="Button2" runat="server" OnClientClick="CloseWnd();return false;"
                                                                Text="Close" />
                                                        </td>
                                                        <td>
                                                            <asp:Button ID="Button3" Style="float: right;" runat="server" Text="Next Step >>"
                                                                OnClick="Button3_Click" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </Content>
                                        </ajaxToolkit:AccordionPane>
                                    </Panes>
                                </ajaxToolkit:Accordion>
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>
                        <ajaxToolkit:TabPanel ID="tpCustCalls" runat="server">
                            <HeaderTemplate>
                                Phone Calls
                            </HeaderTemplate>
                            <ContentTemplate>
                                <ajaxToolkit:Accordion ID="AccordionCalls" runat="server" SelectedIndex="0" HeaderCssClass="accordionHeaderDeselected"
                                    HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent"
                                    FadeTransitions="false" FramesPerSecond="40" TransitionDuration="250" AutoSize="None"
                                    RequireOpenedPane="false" SuppressHeaderPostbacks="true">
                                    <Panes>
                                        <ajaxToolkit:AccordionPane ID="AccordionPane1" runat="server">
                                            <Header>
                                                <a href="" style="text-decoration: none">Customers Calls</a>
                                            </Header>
                                            <Content>
                                                <Calls:ViewCustCalls ID="ucViewCalls" runat="server" />
                                                <table style="width: 100%;">
                                                    <tr>
                                                        <td>
                                                            <asp:Button ID="Button4" Visible="false" runat="server" OnClick="LinkButton2_Click"
                                                                Text="Edit" />
                                                            <asp:Button ID="Button5" Visible="false" runat="server" OnClick="btnCloseEdit_Click"
                                                                Text="Close Edit" />
                                                            <asp:Button ID="Button7" runat="server" OnClientClick="CloseWnd();return false;"
                                                                Text="Close" />
                                                        </td>
                                                        <td>
                                                            <asp:Button ID="Button8" Style="float: right;" runat="server" Text="Next Step >>"
                                                                OnClick="Button3_Click" />
                                                        </td>
                                                    </tr>
                                                </table>
                                            </Content>
                                        </ajaxToolkit:AccordionPane>
                                    </Panes>
                                </ajaxToolkit:Accordion>
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>
                        <ajaxToolkit:TabPanel ID="tpCustType" runat="server">
                            <HeaderTemplate>
                                Customer Type
                            </HeaderTemplate>
                            <ContentTemplate>
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>
                        <ajaxToolkit:TabPanel ID="tpCustNotes" runat="server">
                            <HeaderTemplate>
                                Notes
                            </HeaderTemplate>
                            <ContentTemplate>
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>
                        <ajaxToolkit:TabPanel ID="tpCustLocation" runat="server">
                            <HeaderTemplate>
                                Customer Location
                            </HeaderTemplate>
                            <ContentTemplate>
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>
                        <ajaxToolkit:TabPanel ID="tpCustHold" runat="server">
                            <HeaderTemplate>
                                Holdings
                            </HeaderTemplate>
                            <ContentTemplate>
                                <ajaxToolkit:TabContainer ID="TabContainer3" runat="server" OnClientActiveTabChanged="OnChanged"
                                    ActiveTabIndex="0">
                                    <ajaxToolkit:TabPanel ID="tpHoldingLots" runat="server">
                                        <HeaderTemplate>
                                            Holding Lots
                                        </HeaderTemplate>
                                        <ContentTemplate>
                                        </ContentTemplate>
                                    </ajaxToolkit:TabPanel>
                                </ajaxToolkit:TabContainer>
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>
                    </ajaxToolkit:TabContainer>
                </ContentTemplate>
            </ajaxToolkit:TabPanel>
            <ajaxToolkit:TabPanel ID="tpEOIEnquiries" runat="server">
                <HeaderTemplate>
                    EOI Enquiries
                </HeaderTemplate>
                <ContentTemplate>
                    <ajaxToolkit:Accordion ID="AccordionEOIEnquiry" runat="server" SelectedIndex="0"
                        HeaderCssClass="accordionHeaderDeselected" HeaderSelectedCssClass="accordionHeaderSelected"
                        ContentCssClass="accordionContent" FadeTransitions="false" FramesPerSecond="40"
                        TransitionDuration="250" AutoSize="None" RequireOpenedPane="false" SuppressHeaderPostbacks="true">
                        <Panes>
                            <ajaxToolkit:AccordionPane ID="AccordionPane10" runat="server">
                                <Header>
                                    <a href="" style="text-decoration: none">Text</a>
                                </Header>
                                <Content>
                                    <EOI:ViewEOIEnquriy ID="ucViewEOIEnquriy" runat="server" />
                                    <asp:PlaceHolder ID="phEOIEnquiries" Visible="false" runat="server"></asp:PlaceHolder>
                                    <table style="width: 100%;">
                                        <tr>
                                            <td>
                                                <asp:Button ID="btnEditEOIEnquiry" Visible="false" runat="server" OnClick="btnEditEOIEnquiry_Click"
                                                    Text="Edit" />
                                                <asp:Button ID="btnCloseEOIEnquiry" Visible="false" runat="server" OnClick="btnCloseEOIEnquiry_Click"
                                                    Text="Close Edit" />
                                                <asp:Button ID="Button6" runat="server" OnClientClick="CloseWnd();return false;"
                                                    Text="Close" />
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                    </table>
                                </Content>
                            </ajaxToolkit:AccordionPane>
                        </Panes>
                    </ajaxToolkit:Accordion>
                </ContentTemplate>
            </ajaxToolkit:TabPanel>
            <ajaxToolkit:TabPanel ID="tpEOI" runat="server">
                <HeaderTemplate>
                    Expressions of Interest
                </HeaderTemplate>
                <ContentTemplate>
                    <ajaxToolkit:Accordion ID="AccordionEOI" runat="server" SelectedIndex="0" HeaderCssClass="accordionHeaderDeselected"
                        HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent"
                        FadeTransitions="false" FramesPerSecond="40" TransitionDuration="250" AutoSize="None"
                        RequireOpenedPane="false" SuppressHeaderPostbacks="true">
                        <Panes>
                            <ajaxToolkit:AccordionPane ID="AccordionPane3" runat="server">
                                <Header>
                                    <a href="" style="text-decoration: none">EOI Details</a>
                                </Header>
                                <Content>
                                    <EOI:ViewEOI ID="ucViewEOI" runat="server" />
                                    <asp:PlaceHolder ID="phEOI" Visible="false" runat="server"></asp:PlaceHolder>
                                    <table style="width: 100%;">
                                        <tr>
                                            <td>
                                                <asp:Button ID="btnEditEOI" Visible="false" runat="server" OnClick="btnEditEOI_Click"
                                                    Text="Edit" />
                                                <asp:Button ID="btnCloseEditEOI" Visible="false" runat="server" OnClick="btnCloseEditEOI_Click"
                                                    Text="Close Edit" />
                                                <asp:Button ID="CloseWnd3" runat="server" OnClientClick="CloseWnd();return false;"
                                                    Text="Close" />
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                    </table>
                                </Content>
                            </ajaxToolkit:AccordionPane>
                        </Panes>
                    </ajaxToolkit:Accordion>
                </ContentTemplate>
            </ajaxToolkit:TabPanel>
            <ajaxToolkit:TabPanel ID="tpProjectDetails" runat="server">
                <HeaderTemplate>
                    Project Information
                </HeaderTemplate>
                <ContentTemplate>
                    <ajaxToolkit:TabContainer ID="TabContainer4" runat="server" OnClientActiveTabChanged="OnChanged"
                        ActiveTabIndex="0">
                        <ajaxToolkit:TabPanel ID="tpContract" runat="server">
                            <HeaderTemplate>
                                Contracts
                            </HeaderTemplate>
                            <ContentTemplate>
                                <ajaxToolkit:Accordion ID="Accordion2" runat="server" SelectedIndex="0" HeaderCssClass="accordionHeaderDeselected"
                                    HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent"
                                    FadeTransitions="false" FramesPerSecond="40" TransitionDuration="250" AutoSize="None"
                                    RequireOpenedPane="true" SuppressHeaderPostbacks="true">
                                    <Panes>
                                        <ajaxToolkit:AccordionPane ID="AccordionPane4" runat="server">
                                            <Header>
                                                <a href="" style="text-decoration: none">Text</a>
                                            </Header>
                                            <Content>
                                            </Content>
                                        </ajaxToolkit:AccordionPane>
                                        <ajaxToolkit:AccordionPane ID="AccordionPane5" runat="server">
                                            <Header>
                                                <a href="" style="text-decoration: none">Text</a>
                                            </Header>
                                            <Content>
                                            </Content>
                                        </ajaxToolkit:AccordionPane>
                                        <ajaxToolkit:AccordionPane ID="AccordionPane6" runat="server">
                                            <Header>
                                                <a href="" style="text-decoration: none">Text</a>
                                            </Header>
                                            <Content>
                                            </Content>
                                        </ajaxToolkit:AccordionPane>
                                    </Panes>
                                </ajaxToolkit:Accordion>
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>
                        <ajaxToolkit:TabPanel ID="tpProject" runat="server">
                            <HeaderTemplate>
                                Project Details
                            </HeaderTemplate>
                            <ContentTemplate>
                                <ajaxToolkit:Accordion ID="Accordion3" runat="server" SelectedIndex="0" HeaderCssClass="accordionHeaderDeselected"
                                    HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent"
                                    FadeTransitions="false" FramesPerSecond="40" TransitionDuration="250" AutoSize="None"
                                    RequireOpenedPane="true" SuppressHeaderPostbacks="true">
                                    <Panes>
                                        <ajaxToolkit:AccordionPane ID="AccordionPane7" runat="server">
                                            <Header>
                                                <a href="" style="text-decoration: none">Text</a>
                                            </Header>
                                            <Content>
                                            </Content>
                                        </ajaxToolkit:AccordionPane>
                                        <ajaxToolkit:AccordionPane ID="AccordionPane8" runat="server">
                                            <Header>
                                                <a href="" style="text-decoration: none">Text</a>
                                            </Header>
                                            <Content>
                                            </Content>
                                        </ajaxToolkit:AccordionPane>
                                        <ajaxToolkit:AccordionPane ID="AccordionPane9" runat="server">
                                            <Header>
                                                <a href="" style="text-decoration: none">Text</a>
                                            </Header>
                                            <Content>
                                            </Content>
                                        </ajaxToolkit:AccordionPane>
                                    </Panes>
                                </ajaxToolkit:Accordion>
                            </ContentTemplate>
                        </ajaxToolkit:TabPanel>
                    </ajaxToolkit:TabContainer>
                </ContentTemplate>
            </ajaxToolkit:TabPanel>
            <ajaxToolkit:TabPanel ID="tpMonitoringEvaluation" runat="server">
                <HeaderTemplate>
                    Monitoring and Evaluation
                </HeaderTemplate>
                <ContentTemplate>
                    <ajaxToolkit:Accordion ID="Accordion5" runat="server" SelectedIndex="0" HeaderCssClass="accordionHeaderDeselected"
                        HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent"
                        FadeTransitions="false" FramesPerSecond="40" TransitionDuration="250" AutoSize="None"
                        RequireOpenedPane="true" SuppressHeaderPostbacks="true">
                        <Panes>
                            <ajaxToolkit:AccordionPane ID="AccordionPane16" runat="server">
                                <Header>
                                    <a href="" style="text-decoration: none">Text</a>
                                </Header>
                                <Content>
                                </Content>
                            </ajaxToolkit:AccordionPane>
                            <ajaxToolkit:AccordionPane ID="AccordionPane17" runat="server">
                                <Header>
                                    <a href="" style="text-decoration: none">Text</a>
                                </Header>
                                <Content>
                                </Content>
                            </ajaxToolkit:AccordionPane>
                            <ajaxToolkit:AccordionPane ID="AccordionPane18" runat="server">
                                <Header>
                                    <a href="" style="text-decoration: none">Text</a>
                                </Header>
                                <Content>
                                </Content>
                            </ajaxToolkit:AccordionPane>
                        </Panes>
                    </ajaxToolkit:Accordion>
                    <asp:LinkButton ID="LinkButton2" runat="server">Add New</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="LinkButton3" runat="server">Edit Existing</asp:LinkButton>
                </ContentTemplate>
            </ajaxToolkit:TabPanel>
        </ajaxToolkit:TabContainer>
        <asp:LinkButton ID="LinkButton10" runat="server" Text="Close" OnClientClick="CloseWnd();return false;" />
    </div>
    <asp:SqlDataSource ID="CustomerDS" runat="server" ConnectionString="<%$ ConnectionStrings:CMA_projects %>"
        SelectCommand="SELECT CustomerID, CMAID, Name_Contact, Name_First, Name_Last, Name_Entity, CARMSID, PreferredContactMethod, Phone_Business, Mobile_Business, Fax_Business, Email_Business, Phone_Private, ABN, ACN, Name_LegalTrading, TradingNameCount, EntityTypeID, GST_Reg, ABN_Valid, ABNStatusDate, GSTStatusDate, LastModifiedDate, SAPVendor, TitleID, Mailing_Name, Postal_Address, Postal_Address_Line2, StateID, LocationID, PostCodeID, POBox, GroupParticipant, CustomerTypeGroupID, CustomerGroupNameID, Notes, DataEntryOfficer_UserID, CustomerDetails_EditedBy, CustomerDetails_EditedDate FROM CMA_projects.customers_data_0_details WHERE (CustomerID = @CustomerID) ORDER BY Name_Last">
        <SelectParameters>
            <asp:SessionParameter Name="CustomerID" SessionField="CustomerID" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="CallsDS" runat="server" ConnectionString="<%$ ConnectionStrings:CMA_projects %>"
        SelectCommand="SELECT CMA_projects.customers_data_2_calls.CallID, CMA_projects.customers_data_0_details.Name_Contact, staff_data_0_staff_list_1.FullName AS [Officer Responsible], CMA_projects.staff_data_0_staff_list.FullName AS [Call Receiver], CMA_projects.customers_data_2_calls.Call_Date, CMA_projects.shared_lut_units_time_hours.Time, CMA_projects.customers_lut_corr_subject.SubjectType, CMA_projects.customers_lut_corr_actions.ActionName, CMA_projects.customers_data_2_calls.Notes FROM CMA_projects.customers_lut_corr_actions RIGHT OUTER JOIN CMA_projects.customers_data_2_calls LEFT OUTER JOIN CMA_projects.shared_lut_units_time_hours ON CMA_projects.customers_data_2_calls.Call_Time = CMA_projects.shared_lut_units_time_hours.TimeID LEFT OUTER JOIN CMA_projects.customers_lut_corr_subject ON CMA_projects.customers_data_2_calls.SubjectID = CMA_projects.customers_lut_corr_subject.SubjectID LEFT OUTER JOIN CMA_projects.staff_data_0_staff_list ON CMA_projects.customers_data_2_calls.UserID_CallReceiver = CMA_projects.staff_data_0_staff_list.UserID LEFT OUTER JOIN CMA_projects.staff_data_0_staff_list AS staff_data_0_staff_list_1 ON CMA_projects.customers_data_2_calls.UserID_ResponsibleOfficer = staff_data_0_staff_list_1.UserID ON CMA_projects.customers_lut_corr_actions.ActionID = CMA_projects.customers_data_2_calls.ActionID LEFT OUTER JOIN CMA_projects.customers_data_0_details ON CMA_projects.customers_data_2_calls.CustomerID = CMA_projects.customers_data_0_details.CustomerID WHERE (CMA_projects.customers_data_0_details.CustomerID = @CustomerID)">
        <SelectParameters>
            <asp:SessionParameter Name="CustomerID" SessionField="CustomerID" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="HoldingsDS" runat="server" ConnectionString="<%$ ConnectionStrings:CMA_projects %>"
        SelectCommand="SELECT CMA_projects.customers_data_1_holdings.PropertyNameID, CMA_projects.customers_data_0_details.Name_Contact, CASE WHEN customers_data_1_holdings.RuralAddress IS NOT NULL THEN customers_data_1_holdings.RuralAddress + N', ' + customers_lut_location.Locality + N', ' + shared_lut_state_name.State + N' ' + CAST(shared_lut_postcodes_australia.PostcodeID AS nvarchar(4)) ELSE customers_data_1_holdings.PropertyName + N', ' + customers_lut_location.Locality + N', ' + shared_lut_state_name.State + N' ' + CAST(shared_lut_postcodes_australia.PostcodeID AS nvarchar(4)) END AS [Rural Address], CMA_projects.customers_data_1_holdings.Property_Area_ha, CMA_projects.customers_data_1_holdings.Legal_Land_Owner, CMA_projects.customers_data_1_holdings.DCDBPropertyCode, CMA_projects.customers_data_1_holdings.IPW_ValidationDate_Property, CMA_projects.customers_data_1_holdings.VGPropertyValuation, CMA_projects.customers_data_0_details.CustomerID FROM CMA_projects.customers_data_0_details RIGHT OUTER JOIN CMA_projects.customers_data_1_holdings LEFT OUTER JOIN CMA_projects.shared_lut_postcodes_australia ON CMA_projects.customers_data_1_holdings.PostCodeID_Property = CMA_projects.shared_lut_postcodes_australia.UID LEFT OUTER JOIN CMA_projects.customers_lut_location ON CMA_projects.customers_data_1_holdings.LocationID_Property = CMA_projects.customers_lut_location.LocationID LEFT OUTER JOIN CMA_projects.shared_lut_state_name ON CMA_projects.customers_data_1_holdings.StateID_Property = CMA_projects.shared_lut_state_name.StateID ON CMA_projects.customers_data_0_details.CustomerID = CMA_projects.customers_data_1_holdings.CustomerID WHERE (CMA_projects.customers_data_0_details.CustomerID = @CustomerID)">
        <SelectParameters>
            <asp:SessionParameter Name="CustomerID" SessionField="CustomerID" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:SqlDataSource ID="LotsxnDPDS" runat="server" ConnectionString="<%$ ConnectionStrings:CMA_projects %>"
        SelectCommand="SELECT CMA_projects.customers_data_1_holdings_lots.SASCadastreID, CMA_projects.customers_data_1_holdings_lots.LotSxnDP, CMA_projects.customers_data_1_holdings_lots.Area_ha, CMA_projects.customers_lut_holdings_landcontrol.LandControl FROM CMA_projects.customers_lut_holdings_landcontrol RIGHT OUTER JOIN CMA_projects.customers_data_1_holdings_lots ON CMA_projects.customers_lut_holdings_landcontrol.LandControlID = CMA_projects.customers_data_1_holdings_lots.LandControlID LEFT OUTER JOIN CMA_projects.customers_data_1_holdings ON CMA_projects.customers_data_1_holdings_lots.PropertyNameID = CMA_projects.customers_data_1_holdings.PropertyNameID WHERE (CMA_projects.customers_data_1_holdings.CustomerID = @CustomerID)">
        <SelectParameters>
            <asp:SessionParameter Name="CustomerID" SessionField="CustomerID" />
        </SelectParameters>
    </asp:SqlDataSource>
    <asp:ScriptManager ID="script1" runat="server">
    </asp:ScriptManager>
    </form>
</body>
</html>
 
 
DetailsForm.aspx.cs
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
public partial class Applications_xDynamics_Forms_DetailsForm : System.Web.UI.Page
{
    protected void Page_Init(object sender, EventArgs e)
    {
        Control cViewEOI = LoadControl("../Controls/Forms/View/ViewEOI.ascx");
        Control cEditEOI = LoadControl("../Controls/Forms/Edit/EditEOI.ascx");
        Control cEditEOIEnquiry = LoadControl("../Controls/Forms/Edit/EditEOIEnquiry.ascx");
        Control ucViewEOIEnquriy = LoadControl("../Controls/Forms/View/ViewEOIEnquries.ascx");
 
        PlaceHolder phEOIEnquiries = (PlaceHolder)AccordionEOIEnquiry.FindControl("phEOIEnquiries");
        phEOIEnquiries.Controls.Add(cEditEOIEnquiry);
        PlaceHolder phEOI = (PlaceHolder)AccordionEOI.FindControl("phEOI");
        phEOI.Controls.Add(cEditEOI);
 
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        //Control cEditEOI = LoadControl("../Controls/Forms/Edit/EditEOI.ascx");
        //Control cEditEOIEnquiry = LoadControl("../Controls/Forms/Edit/EditEOIEnquiry.ascx");
 
        if (!IsPostBack)
        {
            //PlaceHolder phEOIEnquiries = (PlaceHolder)AccordionEOIEnquiry.FindControl("phEOIEnquiries");
            //phEOIEnquiries.Controls.Add(cEditEOIEnquiry);
            //PlaceHolder phEOI = (PlaceHolder)AccordionEOI.FindControl("phEOI");
            //phEOI.Controls.Add(cEditEOI);
 
            //UserControl ucViewCustomer = (UserControl)AccordinCustomerDetails.FindControl("controlViewCust");
            //Button Button1 = (Button)AccordinCustomerDetails.FindControl("Button1");
            //Button btnEditEOIEnquiry = (Button)AccordionEOIEnquiry.FindControl("btnEditEOIEnquiry");
            //System.Web.UI.HtmlControls.HtmlTableCell tdEditCust = (System.Web.UI.HtmlControls.HtmlTableCell)AccordinCustomerDetails.FindControl("tdEditCust");
            //Control cViewEOIEnquiries = LoadControl("../Controls/Forms/View/ViewEOIEnquries.ascx");
            //Button btnEditEOI = (Button)AccordionEOIEnquiry.FindControl("btnEditEOI");
 
            if (HttpContext.Current.User.IsInRole("Case Officers") || HttpContext.Current.User.IsInRole("Administrator"))
            {
                Button1.Visible = true;
                btnEditEOIEnquiry.Visible = true;
                btnEditEOI.Visible = true;
            }
            else if (HttpContext.Current.User.IsInRole("AdminStaff") || HttpContext.Current.User.IsInRole("Board") || HttpContext.Current.User.IsInRole("Call Editors") || HttpContext.Current.User.IsInRole("Group Editors ") || HttpContext.Current.User.IsInRole("Group Officers ") || HttpContext.Current.User.IsInRole("Group Viewers ") || HttpContext.Current.User.IsInRole("Guest") || HttpContext.Current.User.IsInRole("Users"))
            {
                Button1.Visible = true;
 
                AjaxControlToolkit.TabPanel tpProjectDetails = (AjaxControlToolkit.TabPanel)TabContainer1.FindControl("tpProjectDetails");
                TabContainer1.Controls.Remove(tpProjectDetails);
                AjaxControlToolkit.TabPanel tpMonitoringEvaluation = (AjaxControlToolkit.TabPanel)TabContainer1.FindControl("tpMonitoringEvaluation");
                TabContainer1.Controls.Remove(tpMonitoringEvaluation);
            }
            else if (HttpContext.Current.User.IsInRole("Steward Editors") || HttpContext.Current.User.IsInRole("Steward Federal ") || HttpContext.Current.User.IsInRole("Steward Viewer "))
            {
                Button1.Visible = true;
 
                AjaxControlToolkit.TabPanel tpContract = (AjaxControlToolkit.TabPanel)TabContainer4.FindControl("tpContract");
                TabContainer4.Controls.Remove(tpContract);
                AjaxControlToolkit.TabPanel tpProject = (AjaxControlToolkit.TabPanel)TabContainer4.FindControl("tpProject");
                TabContainer4.Controls.Remove(tpProject);
            }
        }
    }
    protected void LinkButton2_Click(object sender, EventArgs e)
    {
        UserControl ucViewCustomer = (UserControl)AccordinCustomerDetails.FindControl("controlViewCust");
        UserControl ucEditCustomer = (UserControl)AccordinCustomerDetails.FindControl("controlEditCust");
        ucViewCustomer.Visible = false;
        ucEditCustomer.Visible = true;
        Button Button1 = (Button)AccordinCustomerDetails.FindControl("Button1");
        Button1.Visible = false;
        Button btnCloseEdit = (Button)AccordinCustomerDetails.FindControl("btnCloseEdit");
        btnCloseEdit.Visible = true;
 
    }
    protected void Button3_Click(object sender, EventArgs e)
    {
    }
    protected void btnCloseEdit_Click(object sender, EventArgs e)
    {
        UserControl ucViewCustomer = (UserControl)AccordinCustomerDetails.FindControl("controlViewCust");
        UserControl ucEditCustomer = (UserControl)AccordinCustomerDetails.FindControl("controlEditCust");
        ucViewCustomer.Visible = true;
        ucEditCustomer.Visible = false;
        Button Button1 = (Button)AccordinCustomerDetails.FindControl("Button1");
        Button1.Visible = true;
 
        Button btnCloseEdit = (Button)AccordinCustomerDetails.FindControl("btnCloseEdit");
        btnCloseEdit.Visible = false;
        //Server.Transfer("../Forms/DetailsForm.aspx");
    }
    protected void btnEditEOIEnquiry_Click(object sender, EventArgs e)
    {
        Control cEditEOIEnquiry = LoadControl("../Controls/Forms/Edit/EditEOIEnquiry.ascx");
        var phEOIEnquiries = (PlaceHolder)AccordionEOIEnquiry.FindControl("phEOIEnquiries");
        var ucViewEOIEnquriy = (UserControl)AccordionEOIEnquiry.FindControl("ucViewEOIEnquriy");
        Telerik.Web.UI.RadComboBox rcbEOI_Enquiry_ID = (Telerik.Web.UI.RadComboBox)ucViewEOIEnquriy.FindControl("rcbEOI_Enquiry_ID");
        phEOIEnquiries.Visible = true;
        phEOIEnquiries.Controls.Add(cEditEOIEnquiry);
        ucViewEOIEnquriy.Visible = false;
    }
    protected void btnCloseEOIEnquiry_Click(object sender, EventArgs e)
    {
        UserControl ucViewEOIEnquriy = (UserControl)AccordionEOIEnquiry.FindControl("ucViewEOIEnquriy");
        PlaceHolder phEOIEnquiries = (PlaceHolder)AccordionEOIEnquiry.FindControl("phEOIEnquiries");
        //Server.Transfer("../Forms/DetailsForm.aspx");
    }
    protected void btnEditEOI_Click(object sender, EventArgs e)
    {
        Control cEditEOI = LoadControl("../Controls/Forms/Edit/EditEOI.ascx");
        PlaceHolder phEOI = (PlaceHolder)AccordionEOI.FindControl("phEOI");
        UserControl ucViewEOI = (UserControl)AccordionEOI.FindControl("ucViewEOI");
        //Telerik.Web.UI.RadComboBox rcbEOI_Application_ID = (Telerik.Web.UI.RadComboBox)ucViewEOIEnquriy.FindControl("rcbEOI_Application_ID");
        phEOI.Visible = true;
        phEOI.Controls.Add(cEditEOI);
        ucViewEOI.Visible = false;
    }
    protected void btnCloseEditEOI_Click(object sender, EventArgs e)
    {
        UserControl ucViewEOI = (UserControl)AccordionEOI.FindControl("ucViewEOI");
        PlaceHolder phEOI = (PlaceHolder)AccordionEOI.FindControl("phEOI");
        //Server.Transfer("../Forms/DetailsForm.aspx");
    }
}

Open in new window

0
Small_BallsAuthor Commented:
Sorry I had an open div tag
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.