Обновление панели обновления по событию нажатия кнопки пользовательского элемента управления - PullRequest
0 голосов
/ 09 октября 2018

У меня есть пользовательский элемент управления «verifyResetBox» с кнопками OK и CANCEL.

На родительской странице я добавил сетку в UpdatePanel и хочу обновить сетку только при нажатии кнопки ОК, а не при нажатии кнопки ОТМЕНА.

Функциональность указана ниже,

1) Загрузить сетку с полями шаблона.2) Пользователь может изменять данные в полях шаблона.3) Когда пользователь нажимает кнопку RESET, появляется всплывающее окно подтверждения с кнопками OK и CANCEL.4) После ОК, страница должна обновиться.

Ниже приведено пользовательское событие в aspx.vb

  Private Sub ConfirmBoxReset_SubmitCleanup() Handles ConfirmBoxReset.SubmitCleanup

 End Sub

Я получаю сообщение об ошибке ниже и не могу продолжить.Ждем правильного подхода для реализации этого.enter image description here

<asp:Content ContentPlaceHolderID="SignWorkflowContent" ID="content" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnSATS" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnRSTS" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnReset" EventName="Click" />
            <%--<asp:AsyncPostBackTrigger ControlID="btnConfirm" EventName ="Click" />--%>
        </Triggers>
        <ContentTemplate>
            <div id="allContent" runat="server" class="content">
                <div id="GridViewCustomerDiv" padding-right="20px">
                    <table runat="server" id="TBCustomer" width="995px" cellpadding="0" cellspacing="10">
                        <tr>
                            <td>
                                <div style="height: 100px; width: 1000;">
                                    <asp:Panel ID="Panel1" runat="server" Height="109px" Width="1117px">
                                        <table id="Table1" style="width: 87%; height: 82px;" runat="server" colspan="0" rowspan="0">
                                            <tr>
                                                <td class="style57" bgcolor="#F4F4F4">
                                                    <asp:Label ID="lblRegNo" runat="server" Font-Bold="True" Text="Reg No. :" Font-Names="Arial"
                                                        Font-Size="8.5pt" ForeColor="#666666" BackColor="#F4F4F4"></asp:Label>
                                                </td>
                                                <td class="style70">
                                                    <asp:Label ID="lblRegNoVal" runat="server" Font-Bold="False" Text="Label" Font-Names="Arial"
                                                        Font-Size="8.5pt"></asp:Label>
                                                </td>
                                                <td bgcolor="White" class="style65">
                                                </td>
                                                <td class="style60" bgcolor="#F4F4F4">
                                                    <asp:Label ID="lblCustNo" runat="server" Font-Bold="True" Text="Customer No. :" Font-Names="Arial"
                                                        Font-Size="8.5pt" ForeColor="#666666" BackColor="#F4F4F4"></asp:Label>
                                                </td>
                                                <td class="style72">
                                                    <asp:Label ID="lblCustNoVal" runat="server" Font-Bold="False" Text="Label" Font-Names="Arial"
                                                        Font-Size="8.5pt"></asp:Label>
                                                </td>
                                                <td bgcolor="White" class="style68">
                                                </td>
                                                <td class="style63" bgcolor="#F4F4F4">
                                                    <asp:Label ID="lblDocType" runat="server" Font-Bold="True" Font-Names="Arial" BackColor="#F4F4F4"
                                                        Font-Size="8.5pt" ForeColor="#666666" Text="Doc Type :"></asp:Label>
                                                </td>
                                                <td class="style74">
                                                    <asp:Label ID="lblDocTypeVal" runat="server" Font-Bold="False" Font-Names="Arial"
                                                        Font-Size="8.5pt" Text="Label"></asp:Label>
                                                </td>
                                                <td bgcolor="White" class="style65">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="style56" bgcolor="#F4F4F4">
                                                    <asp:Label ID="lblStatus" runat="server" Font-Bold="True" Font-Names="Arial" BackColor="#F4F4F4"
                                                        Font-Size="8.5pt" ForeColor="#666666" Text="Status :"></asp:Label>
                                                </td>
                                                <td class="style71">
                                                    <asp:Label ID="lblStatusVal" runat="server" Font-Bold="False" Font-Names="Arial"
                                                        Font-Size="8.5pt" Text="Label"></asp:Label>
                                                </td>
                                                <td bgcolor="White" class="style48">
                                                </td>
                                                <td class="style54" bgcolor="#F4F4F4">
                                                    <asp:Label ID="lblCustNameLoc" runat="server" Font-Bold="True" Text="Customer Name (Local) :"
                                                        Font-Names="Arial" Font-Size="8.5pt" BackColor="#F4F4F4" ForeColor="#666666"></asp:Label>
                                                </td>
                                                <td class="style73">
                                                    <asp:Label ID="lblCustNameLocVal" runat="server" Font-Bold="False" Text="Label" Font-Names="Arial"
                                                        Font-Size="8.5pt"></asp:Label>
                                                </td>
                                                <td bgcolor="White" class="style69">
                                                </td>
                                                <td class="style46" bgcolor="#F4F4F4">
                                                    <asp:Label ID="lblDocID" runat="server" Font-Bold="True" Text="Doc ID :" Font-Names="Arial"
                                                        Font-Size="8.5pt" ForeColor="#666666" BackColor="#F4F4F4"></asp:Label>
                                                </td>
                                                <td class="style75">
                                                    <asp:Label ID="lblDocIDVal" runat="server" Font-Bold="False" Text="Label" Font-Names="Arial"
                                                        Font-Size="8.5pt"></asp:Label>
                                                </td>
                                                <td bgcolor="White" class="style48">
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="style56" bgcolor="#F4F4F4">
                                                    <asp:Label ID="lblConsolidateType" runat="server" Font-Bold="True" BackColor="#F4F4F4"
                                                        Font-Names="Arial" Font-Size="8.5pt" ForeColor="#666666" Text="Consolidate Type :"></asp:Label>
                                                </td>
                                                <td class="style71">
                                                    <asp:Label ID="lblConsolidateTypeVal" runat="server" Font-Bold="False" Font-Names="Arial"
                                                        Font-Size="8.5pt" Text="Label"></asp:Label>
                                                </td>
                                                <td bgcolor="White" class="style48">
                                                    &nbsp;
                                                </td>
                                                <td class="style54" bgcolor="#F4F4F4">
                                                    <asp:Label ID="lblCustNameEng" runat="server" Font-Bold="True" BackColor="#F4F4F4"
                                                        Font-Names="Arial" Font-Size="8.5pt" ForeColor="#666666" Text="Customer Name (Eng) :"></asp:Label>
                                                </td>
                                                <td class="style73">
                                                    <asp:Label ID="lblCustNameEngVal" runat="server" Font-Bold="False" Font-Names="Arial"
                                                        Font-Size="8.5pt" Text="Label"></asp:Label>
                                                </td>
                                                <td bgcolor="White" class="style69">
                                                    &nbsp;
                                                </td>
                                                <td class="style46" bgcolor="#F4F4F4">
                                                    <asp:Label ID="lblDocIssuedCtry" runat="server" Font-Bold="True" Font-Names="Arial"
                                                        Font-Size="8.5pt" ForeColor="#666666" BackColor="#F4F4F4" Text="Doc Issued Ctry :"></asp:Label>
                                                </td>
                                                <td class="style75">
                                                    <asp:Label ID="lblDocIssuedCtryVal" runat="server" Font-Bold="False" Font-Names="Arial"
                                                        Font-Size="8.5pt" Text="Label"></asp:Label>
                                                </td>
                                                <td bgcolor="White" class="style48">
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr>
                                                <td bgcolor="White" class="style56">
                                                    &nbsp;
                                                </td>
                                                <td class="style71">
                                                    &nbsp;
                                                </td>
                                                <td bgcolor="White" class="style48">
                                                    &nbsp;
                                                </td>
                                                <td bgcolor="White" class="style54">
                                                    &nbsp;
                                                </td>
                                                <td class="style73">
                                                    &nbsp;
                                                </td>
                                                <td bgcolor="White" class="style69">
                                                    &nbsp;
                                                </td>
                                                <td bgcolor="White" class="style46">
                                                    &nbsp;
                                                </td>
                                                <td class="style75">
                                                    &nbsp;
                                                </td>
                                                <td bgcolor="White" class="style48">
                                                    &nbsp;
                                                </td>
                                            </tr>
                                            <tr id="MakerRow">
                                                <td bgcolor="White" class="style56" colspan="8">
                                                    <asp:Label ID="lblTargetSignID" runat="server" Font-Names="Arial" Font-Size="10pt"
                                                        ForeColor="#4778C6" Font-Bold="True" Text="Target Signature :"></asp:Label>
                                                    &nbsp;<asp:Label ID="lblTSV" runat="server" BackColor="#F4F4F4" Font-Bold="True"
                                                        Font-Names="Arial" Font-Size="Small" ForeColor="#666666"></asp:Label>
                                                    &nbsp;&nbsp;&nbsp;
                                                    <asp:Button ID="btnSATS" runat="server" Text="Set as Target Signature" Width="146px" />
                                                    &nbsp;
                                                    <asp:Button ID="btnRSTS" runat="server" Text="Reset Target Signature" Width="146px" OnClientClick="ResetTargetSignID()"/>

                                                    &nbsp;
                                                    <asp:Label ID="lblNote" runat="server" Font-Bold="False" Font-Names="Arial" Font-Size="8.5pt"
                                                        ForeColor="Red"></asp:Label>
                                                </td>
                                                <td bgcolor="White" class="style48">
                                                    &nbsp;
                                                </td>
                                            </tr>
                                        </table>
                                    </asp:Panel>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnOK" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="GridPagerCtrl" />
            <%--thiru starts--%>
            <asp:AsyncPostBackTrigger ControlID="btnSATS" EventName="Click" />
            <asp:AsyncPostBackTrigger ControlID="btnRSTS" EventName="Click" />
          <%-- <asp:AsyncPostBackTrigger ControlID="btnConfirm" EventName="Click" />--%>
            <%--thiru ends--%>
        </Triggers>
        <ContentTemplate>
            <div style="height: 350px; width: 995px; overflow: scroll">
                <uc1:SignatureViewGroup ID="SVSGridViewGroupBSU" EnableViewState="True" runat="server" />
                <uc1:SignatureViewGroupBSUChecker ID="SVSGridViewGroupBSUChecker" EnableViewState="True"
                    runat="server" />
            </div>
            <table width="100%" cellpadding="0" cellspacing="0" style="margin-bottom: 10px">
                <tr>
                    <td>
                        <div style="position: absolute; left: -500px;">
                            <uc1:ImageControl id="imageCtrl" runat="server" ShowActionButton="False" Height="0px"
                                Width="0px" />
                            <asp:HiddenField runat="server" ID="NeedKeyCheck" Value="1" />
                        </div>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
    <div style="width: 86%">
        <ucGridPgr:GridPagerControl ID="GridPagerCtrl" runat="server" />
    </div>
    <asp:UpdatePanel ID="MakerControlPanel" runat="server" UpdateMode="Conditional">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="btnReset" EventName="Click" />
        </Triggers>
        <ContentTemplate>
            <div>
                <table id="MakerTable" style="width: 70%;">
                    <tr>
                        <asp:Label ID="lblRegistration" runat="server" Text="Action For Registration" Font-Size="10pt"
                            ForeColor="#4778C6" Font-Bold="True" Font-Underline="True"></asp:Label>
                    </tr>
                    <tr>
                        <td class="btnnormal">
                            &nbsp;
                            <asp:Button ID="btnSaveExit" runat="server" Text="Save & Exit" />
                        </td>
                        <td class="btnnormal">
                            <asp:Button ID="btnSaveSubmit" runat="server" Text="Save & Submit" />
                        </td>
                        <td class="btnnormal">
                            <asp:Button ID="btnNotify" runat="server" Text="NotifyByEmail" />
                        </td>
                        <td class="btnnormal">
                            <asp:Button ID="btnRemark" runat="server" Text="Remark" />
                        </td>
                        <td class="key">
                            <asp:Label ID="lblReceiptDate" runat="server" meta:resourcekey="lblReceiptDate" ForeColor="red"></asp:Label>
                        </td>
                        <td class="style3">
                            <UniSign:DatePicker ID="txtReceiptDate" runat="server" />
                        </td>
                        <td class="key">
                            <asp:Label ID="lblEffDate" runat="server" meta:resourcekey="lblEffDate" ForeColor="red"></asp:Label>
                        </td>
                        <td class="style4">
                            <UniSign:DatePicker ID="txtEffDate" runat="server" />
                        </td>
                        <td class="btnnormal">
                            &nbsp;
                            <asp:Button ID="btnModify" Width="60px" runat="server" Text="Modify" />
                        </td>
                        <td class="btnnormal">
                            &nbsp;
                            <asp:Button ID="btnReset" Width="60px" runat="server" Text="Reset" />
                        </td>
                    </tr>
                </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="CheckerControlPanel" runat="server">
        <ContentTemplate>
            <div>
                <table id="CheckerTable" style="width: 77%; height: 36px;">
                    <tr>
                        <asp:Label ID="Label1" runat="server" Text="Action For Registration" Font-Size="10pt"
                            ForeColor="#4778C6" Font-Bold="True" Font-Underline="True"></asp:Label>
                    </tr>
                    <tr>
                        <td class="style4">
                            &nbsp;
                            <asp:Button ID="btnReject" runat="server" Text="Reject" Width="75px" />
                        </td>
                        <td class="style3">
                            <asp:Button ID="btnAccept" runat="server" Text="Accept" Width="70px" />
                        </td>
                        <td class="style5">
                            <asp:Button ID="btnDelete" runat="server" Text="Delete" Style="margin-left: 0px"
                                Width="75px" />
                        </td>
                        <td class="style6">
                            <asp:Button ID="btnNotifyMail" runat="server" Text="Notify By Email" />
                        </td>
                        <td class="style7">
                            <asp:Button ID="btnSaveNExit" runat="server" Text="Save & Exit" />
                        </td>
                        <td class="style10">
                            <asp:Label ID="lblRecDate" runat="server" meta:resourcekey="lblReceiptDate" Font-Size="9pt"
                                Font-Bold="True" Font-Underline="True" ForeColor="Black"></asp:Label>
                        </td>
                        <td class="style9">
                            <asp:Label ID="lblEfDate" runat="server" meta:resourcekey="lblEffDate" Font-Size="9pt"
                                Font-Bold="True" Font-Underline="True" ForeColor="Black"></asp:Label>
                        </td>
                        <td>
                            &nbsp;<asp:Button ID="btnConfirm" Width="153px" runat="server" Text="Confirm Transaction" />
                        </td>
                    </tr>
                </table>
            </div>
            <input type="hidden" id="hdnDuplicateSI" runat="Server" />
            <input type="hidden" id="hdnAction" runat="Server" />
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdatePanel ID="updPopup" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <uc1:RegistrationRemarkPopup id="usrRegRemarkPopup" runat="server" />
            <uc1:InputDialogBox id="inputBox" runat="server" />
            <uc2:ConfirmDialogBox ID="ConfirmBox" runat="server" />
            <uc2:ConfirmDialogBox ID="ConfirmBoxReset" runat="server" />
            <uc2:ConfirmDialogBox ID="ConfirmTarget" runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>
...