我最近更新了一個項目到DNN 6.0.1。我從6.0.1安裝開始,並從那裏添加我的桌面模塊。從5.6.3到6.0.1的某些功能在我的一些用戶控件中出現問題。在我深入瞭解之前,我會承認我有點像一個nube。找不到UpdatePanel ID
快速概述我有一個ascx,其中包含其在asp嚮導中包含其他控件的另一個控件中的所有功能。
(這麼多的嵌套控件的原因是躲在用於許可目的的功能,事實上,另一個模塊[也許可]依賴於第一子控件的功能)
它是這樣的家長:ViewReportRisk.ascx >> Child:ReportRiskWizard.ascx >> Second-Child:Attachments.ascx (許可 - 隱藏功能)(主要功能)(支持功能的控件)
嚮導(在子控件中)位於Telerik RadMultiPage。我遇到麻煩的控件(第二個子控件)包含一個封裝在asp更新面板中的RadUploader。
當我在嚮導中點擊「下一步」,查看與RadUploader控制,我得到這個錯誤:
Sys.InvalidOperationException: Sys.InvalidOperationException: Could not find UpdatePanel with ID 'dnn_ctr445_ViewReportIssue_wzAddRisk_AttachmentsAddTemp_UpdatePanel1'. If it is being updated dynamically then it must be inside another UpdatePanel.' when calling method: [nsIDOMEventListener::handleEvent]
ID是好的。我不動態創建控件,當我刪除更新面板時,控件出現,但上傳功能丟失。
控件快速概覽(略):
ViewReportIssue.ascx
<%@ Control Language="C#" Inherits="NWDS.Modules.ReportIssue.ViewReportIssue" AutoEventWireup="true"
CodeBehind="ViewReportIssue.ascx.cs" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register src="ReportIssueWizard.ascx" tagname="ReportIssueWizard" tagprefix="uc2" %>
<%@ Register src="../Utils/LicensingInfo.ascx" tagname="LicensingInfo" tagprefix="uc1" %>
<uc1:LicensingInfo ID="LicensingInfo1" runat="server" />
<asp:Panel runat="server" ID="pnlContainer">
<uc2:ReportIssueWizard ID="ReportIssueWizard1" runat="server" />
</asp:Panel>
ReportIssueWizard.ascx
<%@ Register Src="Attachments.ascx" TagName="Attachments" TagPrefix="nwds" %>
<%@ Register Src="NonPunitiveReportingPolicy.ascx" TagName="NonPunitiveReportingPolicy"
TagPrefix="nwds" %>
<%@ Register Src="DescriptionCorrectiveAction.ascx" TagName="DescriptionCorrectiveAction"
TagPrefix="nwds" %>
<%@ Register Src="ThankYou.ascx" TagName="ThankYou" TagPrefix="nwds" %>
<%@ Register Src="SelectDivisionTypeCustomType.ascx" TagName="SelectDivisionTypeCustomType"
TagPrefix="nwds" %>
<%@ Register Src="IssuePeopleInvolved.ascx" TagName="IssuePeopleInvolved" TagPrefix="nwds" %>
<%@ Register Src="WhereWhen.ascx" TagName="WhereWhen" TagPrefix="nwds" %>
<%@ Register Src="CustomATC.ascx" TagName="ATC" TagPrefix="customReport" %>
<%@ Register Src="CustomCabinSafety.ascx" TagName="Cabin" TagPrefix="customReport" %>
<%@ Register Src="CustomFlightSafety.ascx" TagName="Flight" TagPrefix="customReport" %>
<%@ Register Src="CustomMaintenance.ascx" TagName="Maintenance" TagPrefix="customReport" %>
<%@ Register Src="ReportRiskViewMode.ascx" TagName="ViewMode" TagPrefix="nwds" %>
<%@ Register Src="CustomParamedic.ascx" TagName="CustomParamedic" TagPrefix="nwds" %>
<%@ Register Src="QuickReport.ascx" TagName="QuickReport" TagPrefix="nwds" %>
<%@ Register Src="../Utils/GlobalMessage.ascx" TagName="GlobalMessage" TagPrefix="nwds" %>
<telerik:RadTabStrip ID="tsMenu" runat="server" MultiPageID="mpvMain" Skin="Telerik"
AutoPostBack="True" SelectedIndex="0" OnTabClick="tsMenu_TabClick">
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="mpvMain" runat="server" RenderSelectedPageOnly="True" SelectedIndex="0"
Width="100%">
<telerik:RadPageView runat="server" ID="pvReport">
<div id="forcer" runat="server">
<asp:Label ID="lblWarning" CssClass="Warning" runat="server"></asp:Label>
<asp:MultiView ID="mvReportRisk" runat="server">
<asp:View ID="vBasicDetails" runat="server">
<asp:Wizard ID="wzAddRisk" runat="server" Width="1000px" OnActiveStepChanged="wzAddRisk_ActiveStepChanged"
OnNextButtonClick="ChangeHeaderNext" OnPreviousButtonClick="ChangeHeaderPrevious"
OnFinishButtonClick="wzAddRisk_FinishButtonClick" ActiveStepIndex="0">
<WizardSteps>
<asp:WizardStep ..........
<asp:WizardStep ID="Attachments" runat="server" Title="7. Add Attachments">
<nwds:Attachments ID="AttachmentsAddTemp" runat="server" CanAddNewAttachments="true"
UserCanEdit="true" attachmentType="Temp" />
</asp:WizardStep>
</WizardSteps>
<FinishNavigationTemplate>
<table width="100%" class="formBg">
<tr>
<td align="left" valign="top">
<asp:Button ID="btnPrevious" runat="server" CssClass="Button" Text="Previous" OnClick="ChangeHeaderPrevious" />
</td>
<td align="right" valign="top">
<asp:Button ID="btnSubmitIssue" runat="server" CssClass="Button" Text="Submit" OnClick="btnSubmitIssue_Click" />
</td>
</tr>
</table>
</FinishNavigationTemplate>
<StepNavigationTemplate>
<table width="100%" class="formBg">
<tr>
<td>
<div style="padding-top: 0px; text-align: left;">
<asp:Button ID="btnPrevious" runat="server" CssClass="Button" Text="Previous" OnClick="ChangeHeaderPrevious" />
</div>
</td>
<td>
<div style="padding-top: 0px; text-align: right;">
<asp:Button ID="Button2" runat="server" CssClass="Button" Text="Next" OnClick="ChangeHeaderNext" />
</div>
</td>
</tr>
</table>
</StepNavigationTemplate>
<HeaderStyle CssClass="formHeadingSub" />
<SideBarTemplate>
<asp:DataList ID="SideBarList" runat="server">
<SelectedItemStyle Font-Bold="True" />
<ItemTemplate>
<asp:LinkButton ForeColor="Black" ID="SideBarButton" runat="server" Font-Size="1em"
OnClick="ChangeHeader" BackColor="transparent" Font-Underline="True" Font-Bold="true"></asp:LinkButton>
</ItemTemplate>
<SelectedItemTemplate>
<asp:LinkButton ID="SideBarButton" OnClick="ChangeHeader" runat="server" BackColor="#e4e4e4"
ForeColor="Black" Font-Bold="true" Font-Underline="True" Font-Size="1em"></asp:LinkButton>
</SelectedItemTemplate>
</asp:DataList>
</SideBarTemplate>
</asp:Wizard>
<br />
<div class="">
<strong>Note: </strong>For best results, do not use the browser back button. Use
either the "Previous" button or the side menu to navigate.
</div>
</asp:View>
</asp:MultiView>
</div>
</telerik:RadPageView>
Attachments.ascx
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Attachments.ascx.cs" Inherits="NWDS.Modules.ReportIssue.Attachments" %>
<%@ Register Src="../Utils/GlobalMessage.ascx" TagName="GlobalMessage" TagPrefix="nwds" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<style type="text/css">
ul li
{
list-style: none;
}
</style>
<div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<telerik:radgrid id="gvAttachments" width="50%" skin="Default" runat="server" autogeneratecolumns="False"
allowautomaticdeletes="True" allowautomaticupdates="True" gridlines="None"
ondeletecommand="gv_DeleteCommand" datasourceid="odsAttachments" visible="False"
onitemdatabound="gv_ItemDataBound">
</telerik:radgrid>
<telerik:radgrid id="gvTemp" width="50%" skin="Default" runat="server" autogeneratecolumns="False"
allowautomaticupdates="True" gridlines="None" datasourceid="odsTempFiles" visible="false" ondeletecommand="gv_DeleteCommand"
onitemdatabound="gv_ItemDataBound">
</telerik:radgrid>
<telerik:radgrid id="gvNonReportedIssueRelatedAttachments" width="50%" skin="Default" runat="server"
autogeneratecolumns="False" allowautomaticupdates="True"
gridlines="None" datasourceid="odsNonReportedIssueRelatedAttachments"
visible="false" ondeletecommand="gv_DeleteCommand" onitemdatabound="gv_ItemDataBound">
</telerik:radgrid>
<br />
<telerik:radupload id="ruIssueAttachments" runat="server" onfileexists="ruIssueAttachments_FileExists"
allowedfileextensions="tiff,jpg,jpeg,png,gif,bmp,doc,docx,xls,xlsx,pdf,txt" controlobjectsvisibility="None"
initialfileinputscount="10">
</telerik:radupload>
<div style="padding-bottom: 15px;">
<asp:Button ID="btnUploadAttachments" runat="server" Text="Upload" CssClass="Button"
OnClick="UploadFiles" />
<asp:Label id="lblUploadWarning" runat="server" style="font-weight: bold; color: Red;">To add the attachment, click the Upload Button</asp:Label></div></div>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="btnUploadAttachments" />
</Triggers>
</asp:UpdatePanel>
這並沒有發生在DNN 5.6.3版本,只在6.0.1(模塊中的代碼相同)
只爲S & GI放置在另一個二子控件上的更新面板,它拋出了相同的錯誤,所以我確定它與嵌套控件(Parent-Child-GrandChild)有關,但我不確定如何解決這個問題。
任何幫助是極大的讚賞,在此先感謝。
那麼我會接受這個答案。 – Blender
您可能想要閱讀關於DNN 6中updatepanels用戶的博客主題。作爲「使用部分呈現」模塊選項的結果使用的基礎更新面板現在是Telerik更新面板,並且分層更新面板可能會破壞事情。 http://www.ifinity.com.au/Blog/EntryId/118/DotNetNuke-6-0-and-ASP-NET-Ajax-Update-Panels –
我有同樣的問題,但補充說沒有幫助... http://stackoverflow.com/questions/25365941/why-isnt-the-updatepanel-found-to-update-the-data – SearchForKnowledge