postbacks and modalpopup

Last post 04-23-2008 4:23 AM by poddar_himanshu@yahoo.co.in. 3 replies.

Sort Posts:

  • postbacks and modalpopup

    04-17-2008, 5:59 AM
    • Member
      56 point Member
    • profnachos
    • Member since 12-15-2004, 7:06 PM
    • Posts 109

    I have read all the posts I could find which covers this often discussed topic, but have not been able to find anything which covers my scenario, so please bear with me.

    A) I have a button which shows the popup via server in code behind (I cannot use client code to do this in this case)   I would like to use an updatepanel to only draw the modalpopup.

    B) I also have buttons inside the popup which case postbacks.  I would like to have the popup stay open when the buttons are pushed.

     

    I know how to accomplish each of the above independently.

    A) Enclose the popup in an updatepanel, and define the button as a trigger.   Works.

    B) Inside the popup, enclose the buttons which cause postbacks.  Works.  The popup stays open.

    But when A and B are done together, A works, but B does not.  When buttons are pushed, the popup disappears.

    Is it because an updatepanel is nested in another one?  I cannot think of a solution. 
     


     

  • Re: postbacks and modalpopup

    04-17-2008, 6:45 AM
    • Member
      61 point Member
    • Radu84
    • Member since 06-27-2006, 8:20 PM
    • Denmark
    • Posts 16

    Please post the exact html markup.

  • Re: postbacks and modalpopup

    04-23-2008, 3:30 AM
    Answer

    Hi Profnachos,

    It is recommended to use this kind of page layout.

    <UpdatePanel UpdateMode="Conditional">

    <Panel tied to ModalPopupExtender> <UpdatePanel UpdateMode="Conditional">Buttons here.<UpdatePanel> </Panel>

     <ModalPopupExtender></ModalPopupExtender>

    <Buttons which triggers UpdatePanel and show the ModalPopupExtender>

    </UpdatePanel> 

    Best regards,

    Jonathan

    Jonathan Shen
    Microsoft Online Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
  • Re: postbacks and modalpopup

    04-23-2008, 4:23 AM
    Answer

    hi,

     

    the solution provided by Jonathan should work.

    just want to add there is no need to put second updatepanel  <UpdatePanel UpdateMode="Conditional">Buttons here.<UpdatePanel>

    as first updatepanel is enough.

     

    Still if it doesnt solve ur problem...u can write modal ModalPopupExtenderID1.Show() [modalpopup id of the panel that u want to show] as the last line of submit button.

    Thanks

    --------------------------------------------------------

    Mark as answered if this or any other post helps in finding solution to ur query, it will help others later....
Page 1 of 1 (4 items)