Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Issue with ModalPopUpExtender

$
0
0

Hi All,

I'm facing a strange (for me) problem using a ModalPopUpExtender.
When I show it everything is good, when I hide it and then I want to show it again it doesn't appear anymore unless I reload the page.
This is the (partial) code of the page:

<cc1:ModalPopupExtender ID="modalSelCorso" runat="server" PopupControlID="pnlSelCorso"
        TargetControlID="LinkButton7" BehaviorID="modalSelCorso" 
        BackgroundCssClass="modalBackground"></cc1:ModalPopupExtender><asp:LinkButton ID="LinkButton7" runat="server"></asp:LinkButton><asp:Panel ID="pnlSelCorso" runat="server" CssClass="modalPopup" Style="display: none" >            <div style="overflow-y: auto; overflow-x: hidden;"><div class="modal-header light-blue darken-3 white-text"><asp:Label ID="Label19" runat="server" CssClass="modal-title" Text="Seleziona Corso"></asp:Label></div><div class="modal-body"><div class="form-group">                    <asp:UpdatePanel ID="updSelCorso" runat="server" UpdateMode="Conditional"><ContentTemplate>                          <div class="table-responsive"><asp:GridView ID="gvSelCorso" runat="server" AllowPaging="True" DataKeyNames = "ID" ShowHeader="false" AutoGenerateColumns="False" CellPadding="0" Font-Names="Calibri" Height="0px" PageSize="15"  align="center" CssClass="table table-striped table-bordered table-hover"
                            OnRowCreated="gvSelCorso_RowCreated" OnPageIndexChanging="gvSelCorso_PageIndexChanging" OnSelectedIndexChanged="gvSelCorso_SelectedIndexChanged"><Columns><asp:BoundField DataField="codice" HeaderText="Codice Corso"/><asp:BoundField DataField="descr" HeaderText="Descrizione"/>                                <asp:BoundField DataField="ID" Visible="False"/>                            </Columns><FooterStyle Height="20%" BackColor="#99CCCC" ForeColor="#003399" /><HeaderStyle BackColor="#0088CC" Font-Bold="True" ForeColor="#FFFFFF" /><PagerStyle CssClass="gridview"/><RowStyle Height="40px" BackColor="White" ForeColor="#003399" Wrap="False"/><SelectedRowStyle BackColor="LightBlue" BorderStyle="Solid" Font-Bold="True" ForeColor="White" />                    </asp:GridView>                </div></ContentTemplate></asp:UpdatePanel></div><div class="modal-footer"><div class="row" style="margin-left: auto; margin-right: auto;"><div class="col-md-12">                                <button id="btAnnSelCorso" runat="server" class="btn btn-danger" title="chiude il popup" onserverclick="btAnnSelCorso_Click">Annulla</button></div></div></div> </div></div></asp:Panel>

So...in the "codebehind" (C#) I show the popup through "modalSelCorso.Show()" (by clicking on a button in the page), it appears (it's a gridview to select an item from the list):
1) if I click on an item, the popup is closed through "modalSelCorso.Hide()" in the "OnSelectedIndexChanged" event: if I click the button to show the popup again, it shows;
2) if I click on "btAnnSelCorso" (thus without selecting an item) the popup closes (modalSelCorso.Hide(), codebehind) but if I click on the button to show it again it never shows anymore, I have to reload the page and then it works

What am I doing wrong?
Thank you, regards.


Roberto


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>