Showing Modalpopupextender using the code behind.

Last post 12-09-2007 1:36 AM by DisturbedBuddha. 1 replies.

Sort Posts:

  • Showing Modalpopupextender using the code behind.

    12-07-2007, 2:51 PM
    • Participant
      1,266 point Participant
    • mhariri
    • Member since 11-15-2004, 8:35 PM
    • Posts 502

    hi,

     I have a panel inside and ajax updatepanel which I am using with the modalpopupextender. The panel is tied to a button and pops up when the button is clicked. I am trying to popup the panel when customvalidator Server validate event is activated like

    protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)

    {

    if (1 == 1)

    {

    args.IsValid=
    false;

    //ModalPopupExtender1.Show();

    }

    else

    {

    //ModalPopupExtender1.Hide();

    args.IsValid = true;

    }

    }

    This does not work. the panel just stays on all the time and does not exhibit any of the modalpopup attributes(background, position, etc). The panel justshows up where it is on the bottom of the page. Does any body have a solution?

     

    Thanks,
    Mo

  • Re: Showing Modalpopupextender using the code behind.

    12-09-2007, 1:36 AM
    Answer

    Actually, it probably is working correctly.  The graying out of the background and whatnot is CSS settings.  Just using a modalpopupextender without setting the proper CSS classes does not change the background.

    http://www.asp.net/learn/ajax-videos/video-85.aspx

    When you ask a question, remember to click "mark as answered" when you get a reply which answers your question.


    My latest ASP.NET AJAX blog entries.
Page 1 of 1 (2 items)