Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm using Master Pages, and there are 2 user control. Problem arises with child page, those user controls are not displayed, it gives following error

Error Rendering Control - urctheader
Error Rendering Control - urctlAliaFormsLeftMenu


Following is snippet of my code both Master and Child Page

Master Page:
<pre lang="xml"><%@ Master Language="VB" AutoEventWireup="false" CodeBehind="Main.master.vb" Inherits="AliaForms.Main" %>
<%@ Register TagPrefix="uc1" TagName="AliaFormsLeftMenu" Src="~/Controls/AliaFormsLeftMenu.ascx" %>
<%@ Register TagPrefix="uc1" TagName="AliaFormsTopPanel" Src="~/Controls/TopPanel.ascx" %>
<!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>
   <script src="/js/ValidateInput.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div id="mainwrapper">
   <uc1:AliaFormsTopPanel id="urctheader" runat="server"  ></uc1:AliaFormsTopPanel>
                <uc1:AliaFormsLeftMenu id="urctlAliaFormsLeftMenu" runat="server"></uc1:AliaFormsLeftMenu>
                <div id="content_wrapper">
        <asp:ContentPlaceHolder ID="cphMain" runat="server">
        </asp:ContentPlaceHolder>
        </div>
    </div>
    </form>
</body>
</html>




Child Page:
<pre lang="xml"><%@ Page Language="vb" AutoEventWireup="false" CodeBehind="PreEstimate.aspx.vb" Inherits="AliaForms.PreEstimate" MasterPageFile="~/Main.Master" Theme="Alia" StylesheetTheme="Alia" Title="Estimates" %>
<%@ Register Assembly="EuoControl" Namespace="EuoControl" TagPrefix="acc"  %>
<asp:Content ID="cphCl" ContentPlaceHolderID="cphMain" runat="server"

>
XML
<h2>Estimate</h2>
<div id="table_border">
<div class="row tar">
<div class="fr" style="padding-left:10px"> <span class="btn"><a href="PreEstimateAdd.aspx?EstId=-1" runat="server" id="btnAdd"><img src="../images/btn_create.jpg" border="0" title="Add" /></a></span></div>
<div class="fr" style="padding-left:10px" > <asp:ImageButton runat="server" ID="btnExcel" ImageUrl="~/Images/btn_Excel.jpg" /></div>
<div class="fr" style="padding-left:10px"  > <asp:ImageButton runat="server" ID="btnCatalogue"  ImageUrl="~/Images/btn_Catalogue.jpg"  /></div>
</div>
<asp:UpdatePanel runat="server" ID="upSearch" UpdateMode="Conditional" RenderMode="Inline">
<ContentTemplate>
<div>
<div class="fl">Client :<br/><asp:dropdownlist id="dropdownlistClient" CssClass="dropdown" runat="server" Width="160px" AutoPostBack="True" ></asp:dropdownlist></div>
<div class="fl"  style="padding-left:5px">
Brand :<br/><asp:dropdownlist id="dropdownlistbrands" runat="server" Width="160px" AutoPostBack="True" ></asp:dropdownlist></div>
<div class="fl"  style="padding-left:5px">
BilledTo :<br/><asp:dropdownlist id="dropdownlistbilledto" runat="server"
        Width="160px" AutoPostBack="False" Height="16px" ></asp:dropdownlist>
</div>
<div class="fl" style="padding-left:5px" > <asp:ImageButton runat="server" ID="btnSearch"
        ImageUrl="~/App_Themes/Alia/Images/btn_search.jpg"  /></div>
<div  class="fl" style="padding-left:5px" > <asp:ImageButton runat="server" ID="btnReferesh"
        ImageUrl="~/Images/btn_Refresh.jpg"  /></div>
</div>
</ContentTemplate>
</asp:UpdatePanel>


<asp:Label id="labelMsg" class="red_txt" runat="server" EnableViewState="False"></asp:Label>

<DIV id="table">
<asp:UpdatePanel runat="server" ID="upGrid" UpdateMode="Conditional" >
<ContentTemplate>
<acc:GridEuo ID="gvEstimate" SkinID="ProductView" runat="server" DataKeyNames="EstimateId"
                            DataSourceID="odsEstimates"
        AutoGenerateColumns="False"  >
                            <Columns>
                            <asp:TemplateField  >
                            <HeaderTemplate>
                                <asp:CheckBox runat="server" ID="HeaderLevelCheckBox" onclick="javascript:SelectAllCheckboxes(this);" AutoPostBack="false" ToolTip="Select/Deselect All"  />
                                </HeaderTemplate>
                            <ItemTemplate>
                            <asp:CheckBox  runat="server" ID="checkboxselect" />
                               <asp:Label ID="lblEstimateId" runat="server" Visible="false"   Text='<%# DataBinder.Eval(Container.DataItem,"EstimateId")%>' ></asp:Label>
                            </ItemTemplate>
                            </asp:TemplateField>
                                <asp:BoundField DataField="Estimatenumber" HeaderText="Estimate No." SortExpression="Estimatenumber" />
                                <asp:BoundField DataField="EstimateDate" HeaderText="EstimateDate" HtmlEncode="False"
                                    DataFormatString="{0:dd/MM/yyyy}" SortExpression="EstimateDate" />
                                    <asp:BoundField DataField="EstimateJobList" HeaderText="Job No" SortExpression="EstimateJobList" />
                                <asp:BoundField DataField="clientname" HeaderText="Client" SortExpression="clientname" />
                                <asp:BoundField DataField="brand" HeaderText="Brand" SortExpression="brandname" />
                                <asp:BoundField DataField="billedto" HeaderText="Billed To" SortExpression="billedto" />

                                <asp:BoundField DataField="GrandTotal" HeaderText="Grand Total" HtmlEncode="False" DataFormatString="{0:n2}" SortExpression="GrandTotal" />
                                <asp:BoundField DataField="Remark" HeaderText="Remark" SortExpression="Remark" />
                                <asp:BoundField DataField="EstApprovalStatus" HeaderText="Approval Status" SortExpression="EstApprovalStatus" />

                                <asp:TemplateField Visible="false">
                                    <ItemTemplate>
                                        <asp:ImageButton AlternateText="Delete" ImageUrl="~/App_Themes/Alia/Images/Delete.gif" runat="server" CausesValidation="false"
                                            CommandName="DeleteRc" CommandArgument='<%# Eval("EstimateId") %>' ID="cmdDelete"
                                            OnClientClick="if (confirm('Are you sure you want to delete this Estimate?') == false) return false;" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                    <a runat="server" ID="HypApprove"  Visible="true" href="#"   >Set Approval</a>
                                    </ItemTemplate>
                                    </asp:TemplateField>
                                  <asp:TemplateField>
                                    <ItemTemplate>
                                    <asp:LinkButton runat="server" ID="linkSave" Text="Save"  CommandName="linkSave" CommandArgument='<%# Eval("EstimateId") %>' ></asp:LinkButton><br/>
                                    <asp:HyperLink runat="server" ID="HypSend" Text="ReSend Estimate" Target="_self" Visible="false" NavigateUrl='<%# "~/Pages/PreEstimateAdd.aspx?EstId=" & Eval("EstimateId") %>' ></asp:HyperLink>
                                    </ItemTemplate>
                                    </asp:TemplateField>
                            </Columns>
                            <EmptyDataTemplate>
                                No Estimates.
                            </EmptyDataTemplate>
                            <EmptyDataRowStyle BackColor="White" Height="30px" />
                        </acc:GridEuo>
                        <asp:HiddenField ID="hdSearchCrt" runat="server" />
                        <asp:ObjectDataSource ID="odsEstimates" runat="server" SelectCountMethod="GetViewCount"
                            EnablePaging="true" SelectMethod="GetView"  SortParameterName="sortExpression"
                            TypeName="AliaForms.AliaManager.clsEstimateBL">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="hdSearchCrt" Name="Criteria" PropertyName="Value"
                                    Type="String" DefaultValue="" />
                            </SelectParameters>
                        </asp:ObjectDataSource>
</ContentTemplate>
<Triggers >
<asp:PostBackTrigger ControlID="gvEstimate" />
</Triggers>
</asp:UpdatePanel>

</DIV>
</div>
</asp:Content>


Posted

1 solution

Please include <scriptmanager> in your child page.
XML
<asp:content id="cphCl" contentplaceholderid="cphMain" runat="server" xmlns:asp="#unknown">
<asp:scriptmanager id="ScriptManager1" runat="server"></scriptmanager>

<asp:UpdatePanel runat="server" ID="upGrid" UpdateMode="Conditional" RenderMode="Block" >


If the RenderMode property is set to Inline, the content of an UpdatePanel control is rendered inside an HTML <span> element. If the RenderMode property is set to Block, it is rendered inside an HTML <div> element.

If this helped you then please Vote and marked it as answer.
 
Share this answer
 
v3
Comments
gopal2007 22-Oct-10 2:25am    
Even after adding scriptmanager, still the problem remains same.
NMehta83 22-Oct-10 2:52am    
please see my updated answer it may help you.
Dalek Dave 22-Oct-10 3:33am    
Good Answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900