Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

100
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda