Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

99
Visualizações
To convert datalist in excel if it is under modalpopupextender

I have one datalist in modalpopupextender which I am generating from gridview. However, I am not able to convert it to excel. Is it possible to generate excel from datalist if it is getting populated in modalpopupextender. I am writting my code in asp.net

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Probably need more details. As a general rule, be it a bootstrap popup, jquery.UI, or the one from the ajaxtoolit?

Such dialogs cannot have nor survive a post-back. In most cases, this don't matter, since you hitting some button, and if it to cause some action, the dialog is then colipase due to the page post-back. So a post-back on the page as a general rule will cause the dialog to close. In fact, it quite much causes the whole page to re-load anyway, and again, in most cases that's what you need and want.

However, you CAN consider putting the dialog, the code (a div???) inside of a update panel, and that should be able to survive a post-back.

So, assuming right now, your popup is in a div?

Then do this:

    <div id="mydialog" runat="server" style="border:solid">
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>

        <h2>pop test</h2>

        <asp:Button ID="Button1" runat="server" Text="Button" />

            </ContentTemplate>
        </asp:UpdatePanel>

    </div>

So, the target control id = mydialog in above. Since INSIDE the div we pop has a update panel, then any button click etc. will not collapse the dialog. In fact, often the challenge is to figure out how to close the dialog after!!!

In above, I have a simple button - but the grid view could be in that above example, and buttons + code to generate the csv file for download can be in that div, and can have post backs.

So, right after the div part, surround the rest of the pop dialog inside of the update panel as per above - it should then allow button clicks, and post-backs, and not collapse the dialog. Of course, if your streaming (sending) the resulting csv file down to the client side, then the dialog probably should be closed first.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda