Ajax ModalPopup extender not closing

Discussion in 'ASP .Net' started by Carlos, Sep 23, 2009.

  1. Carlos

    Carlos Guest

    Hi,

    I just built a page which references a panel to popup using
    an Ajax modalpopup extender control. The problem that I have
    has to do with the Cancel button. When pressed it does not close the
    popup. I have tried to just define the CancelControlID property without
    the OnCancelScript property, and it does not close it.

    Can someone help?

    Thanks,

    Carlos.
     
    Carlos, Sep 23, 2009
    #1
    1. Advertisements

  2. Carlos

    Carlos Guest

    Hi again,

    never mind, I just did not referenced the extender properly when
    handling the event to close it when the cancel button was pressed.
    I forgot that I had to include the master page prefix when locating the
    control.
    i.e.

    function onCancel() {

    var modal = $find('ctl00_Contentplaceholder2_ModalPopup');

    modal.hide();

    }
     
    Carlos, Sep 23, 2009
    #2
    1. Advertisements

  3. Carlos

    Carlos Guest

    Thank you so much for the clarification Mark.
    Where can I go to find the theoretical background about this?

    Thanks again!

    Carlos
     
    Carlos, Sep 24, 2009
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.