How get modal window to stay open?!!!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bobby Edward

    How get modal window to stay open?!!!

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

    I put the detailsview in a hidden panel and am using the modalpopupexten der
    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?


  • Mark Rae [MVP]

    #2
    Re: How get modal window to stay open?!!!

    "Bobby Edward" <bobby@nobody.c omwrote in message
    news:O$72G1XKJH A.3744@TK2MSFTN GP06.phx.gbl...
    Any idea how I can prevent it from closing automatically?
    <head>
    <base target="_self" />
    </head>


    --
    Mark Rae
    ASP.NET MVP


    Comment

    • Bobby Edward

      #3
      Re: How get modal window to stay open?!!!

      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]" <mark@markNOSPA Mrae.netwrote in message
      news:%23U9a6bYK JHA.3812@TK2MSF TNGP04.phx.gbl. ..
      "Bobby Edward" <bobby@nobody.c omwrote in message
      news:O$72G1XKJH A.3744@TK2MSFTN GP06.phx.gbl...
      >
      >Any idea how I can prevent it from closing automatically?
      >
      <head>
      <base target="_self" />
      </head>
      >
      >
      --
      Mark Rae
      ASP.NET MVP
      http://www.markrae.net

      Comment

      • Mark Rae [MVP]

        #4
        Re: How get modal window to stay open?!!!

        "Bobby Edward" <bobby@nobody.c omwrote in message
        news:ut4G9xYKJH A.4600@TK2MSFTN GP06.phx.gbl...
        >>Any idea how I can prevent it from closing automatically?
        >>
        ><head>
        > <base target="_self" />
        ></head>
        >
        For some reason though, when I hit the close button on the model I can't
        get the page data to update. Any ideas?
        Not without seeing your code...


        --
        Mark Rae
        ASP.NET MVP


        Comment

        • bruce barker

          #5
          Re: How get modal window to stay open?!!!

          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 modalpopupexten der
          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?
          >
          >

          Comment

          • Bobby Edward

            #6
            Re: How get modal window to stay open?!!!


            "bruce barker" <nospam@nospam. comwrote in message
            news:O74eyoaKJH A.3976@TK2MSFTN GP03.phx.gbl...
            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!


            Comment

            Working...