UpdatePanel trigger killed by Modelpopup TargetControlID

Last post 07-01-2007 9:05 PM by jshallard. 2 replies.

Sort Posts:

  • UpdatePanel trigger killed by Modelpopup TargetControlID

    06-30-2007, 5:31 PM
    • Member
      439 point Member
    • jshallard
    • Member since 08-11-2003, 3:44 AM
    • Gulf Breeze, Florida
    • Posts 173

    I am dynamically registering an image button as the trigger for an update panel with the following code:

    AsyncPostBackTrigger trigger = new AsyncPostBackTrigger();
    trigger.ControlID = imgButton.UniqueID;
    trigger.EventName = "click";
    uxUplImageView.Triggers.Add(trigger);


    This worked great.  However, I then set the same image button as the TargetControlID for a ModalPopupExtender.  This seems to kill the trigger. 

    Does anyone have any ideas how to have the same button as both the trigger for an update panel, and also for a Modalpopup?

    Thanks for any help

  • Re: UpdatePanel trigger killed by Modelpopup TargetControlID

    07-01-2007, 7:08 PM
    Answer
    • Contributor
      2,019 point Contributor
    • Jason Hill
    • Member since 04-23-2006, 3:39 AM
    • Sydney, Australia
    • Posts 479

    You could let the imagebutton postback and then call .Show() on the modalpopup from code behind to show the modal popup after the postback. However, you will need to have a dummy linkbutton defined as the targetcontrolid of the modal popup but this can have style="display:none;" assigned so that it is not visible on the page.

    Jason

  • Re: UpdatePanel trigger killed by Modelpopup TargetControlID

    07-01-2007, 9:05 PM
    • Member
      439 point Member
    • jshallard
    • Member since 08-11-2003, 3:44 AM
    • Gulf Breeze, Florida
    • Posts 173

    Thanks Jason - that should do the trick. 

Page 1 of 1 (3 items)