How get modal window to stay open?!!!

  • Thread starter Thread starter Bobby Edward
  • Start date Start date
B

Bobby Edward

I am doing a simple master/detail page (gridview/detailsview).

I put the detailsview in a hidden panel and am using the modalpopupextender
to display it.

The details view should allow view, insert and update/cancel.

PROBLEM: The popup works perfect. BUT, when I click ANYTHING, such as
'edit', or 'new', the model CLOSES. If I reopen the model I see that the
action has taken place. Any idea how I can PREVENT it from closing
automatically?
 
I put it in an UpdatePanel and it seemed to fix it.

I'll have to research your solution.

For some reason though, when I hit the close button on the model I can't get
the page data to update. Any ideas?
 
the modalpopup does not open a window. it just display a div that was
hidden. if your page does a postback, the page rerenders and the popup
is not displayed (unless you put javascript code to do it - bad idea).

if you put an update panel in the popup, then a rerender is not done, so
the popup does not disappear. if you click close, the div i just hidden,
and no async postback is done. if you need the close to save, replace
with an update trigger then generate javascript that close the popup.
i think you need to add a close method to the popup as it does not have one.

-- bruce (sqlwork.com)
 
bruce barker said:
the modalpopup does not open a window. it just display a div that was
hidden. if your page does a postback, the page rerenders and the popup is
not displayed (unless you put javascript code to do it - bad idea).

if you put an update panel in the popup, then a rerender is not done, so
the popup does not disappear. if you click close, the div i just hidden,
and no async postback is done. if you need the close to save, replace with
an update trigger then generate javascript that close the popup. i think
you need to add a close method to the popup as it does not have one.

-- bruce (sqlwork.com)

Thanks. It really sounds like that's what I need to do. Do you have a link
that I can look at to read more (or sample code)? Thanks!
 
Back
Top