Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How get modal window to stay open?!!!

Reply
Thread Tools

How get modal window to stay open?!!!

 
 
Bobby Edward
Guest
Posts: n/a
 
      10-08-2008
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?


 
Reply With Quote
 
 
 
 
Bobby Edward
Guest
Posts: n/a
 
      10-08-2008
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?

"Mark Rae [MVP]" <> wrote in message
news:%...
> "Bobby Edward" <> wrote in message
> news:O$...
>
>> Any idea how I can prevent it from closing automatically?

>
> <head>
> <base target="_self" />
> </head>
>
>
> --
> Mark Rae
> ASP.NET MVP
> http://www.markrae.net



 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      10-09-2008
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)

Bobby Edward wrote:
> 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?
>
>

 
Reply With Quote
 
Bobby Edward
Guest
Posts: n/a
 
      10-09-2008

"bruce barker" <> wrote in message
news:...
> 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!


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Modal and non modal in same app Leila Java 0 04-26-2005 09:48 PM
How to close a parent modal window when child modal window opens? gopal srinivasan Javascript 0 11-05-2004 05:59 AM
post the form data in modal window and close the modal window. Matt HTML 1 06-01-2004 08:22 PM
post the form data in modal window and close the modal window. Matt Javascript 0 06-01-2004 07:47 PM



Advertisments