How get modal window to stay open?!!!

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?
 
B

Bobby Edward

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?
 
B

bruce barker

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)
 
B

Bobby Edward

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top