2

I am showing a pop up with datagrid on it. When i try to go to next page the pop up closes because the page loads. What should i do to prevent the page to load or to not close the popup?

BTW, I am using Visual Studio 2003 :|

Liz
  • 323
  • 7
  • 17

3 Answers3

3

There are many ways to solve your problem but the quickest/easiest is to simply wrap your DataGrid inside of an UpdatePanel (MSDN).

The UpdatePanel will give the impression of an AJAXified DataGrid and it can be implemented with minimal code.

The code in your ASPX page would look something similar to the following:

<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" />
<div id="myPopUp">
    <asp:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            //Insert DataGrid here
        </ContentTemplate>
</asp:UpdatePanel>

See here for more details: Introduction to the UpdatePanel Control

NakedBrunch
  • 48,713
  • 13
  • 73
  • 98
0

You can apply any one from following solutions

  1. Use Iframe version of Popup.
  2. Ajax : use ajax for changing page.
Govind Malviya
  • 13,627
  • 17
  • 68
  • 94
0

use ajax [update panel] it will help you to not load the page again otherwise put you data grid user control inside a page and load it the page will never be closed except if you close it :)

Eslam Soliman
  • 1,276
  • 5
  • 16
  • 42