title: ModalPopupExtender and validation problems
body: <p>The problem I am facing is that when there is validation on a page and I am trying to display a model pop-up, the pop-up is not getting displayed. And by using fire-bug I have noticed that an error is being thrown.</p>
  
  <p>The button that is used to display the pop-up has cause validation set to false so I am stuck as to what is causing the error.</p>
  
  <p>I have created a sample page to isolate the problem that I am having, any help would be greatly appreciated.</p>
  
  <p><strong>The Error</strong></p>
  
  <pre><code>function () {Array.remove(Page_ValidationSummaries, document.getElementById("ValidationSummary1"));}(function () {var fn = function () {AjaxControlToolkit.ModalPopupBehavior.invokeViaServer("mpeSelectClient", true);Sys.Application.remove_load(fn);};Sys.Application.add_load(fn);}) is not a function
  http://localhost:1131/WebForm1.aspx
  Line 136
  </code></pre>
  
  <p><strong>ASP</strong></p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="CLIck10.WebForm1" %&gt;
  &lt;%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
          &lt;asp:ScriptManager ID="ScriptManager1" runat="server"&gt;
          &lt;/asp:ScriptManager&gt;
          &lt;div&gt;
              &lt;asp:Button ID="btnPush" runat="server" Text="Push" CausesValidation="false" onclick="btnPush_Click" /&gt;
              &lt;asp:TextBox ID="txtVal" runat="server" /&gt;
              &lt;asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtVal" ErrorMessage="RequiredFieldValidator" /&gt;
              &lt;asp:ValidationSummary ID="ValidationSummary1" runat="server" /&gt;
  
  
  
          &lt;asp:Panel ID="pnlSelectClient" Style="display: none" CssClass="box" runat="server"&gt;
          &lt;asp:UpdatePanel ID="upnlSelectClient" runat="server"&gt;
              &lt;ContentTemplate&gt;
                  &lt;asp:Button ID="btnOK" runat="server" UseSubmitBehavior="true" Text="OK" CausesValidation="false" OnClick="btnOK_Click" /&gt;
                  &lt;asp:Button ID="btnCancel" runat="server" Text="Cancel" CausesValidation="false" OnClick="btnCancel_Click" /&gt;
              &lt;/ContentTemplate&gt;
          &lt;/asp:UpdatePanel&gt;
          &lt;/asp:Panel&gt;
  
          &lt;input id="popupDummy" runat="server" style="display:none" /&gt;
  
          &lt;ajaxToolkit:ModalPopupExtender ID="mpeSelectClient" runat="server" 
          TargetControlID="popupDummy"
          PopupControlID="pnlSelectClient" 
          OkControlID="popupDummy"
          BackgroundCssClass="modalBackground" 
          CancelControlID="btnCancel" 
          DropShadow="true"  /&gt;   
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p><strong>Code Behind</strong></p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  
  namespace CLIck10
  {
      public partial class WebForm1 : System.Web.UI.Page
      {
          protected void Page_Load(object sender, EventArgs e)
          {
  
          }
  
          protected void btnOK_Click(object sender, EventArgs e)
          {
              mpeSelectClient.Hide();
          }
  
          protected void btnCancel_Click(object sender, EventArgs e)
          {
              mpeSelectClient.Hide();
          }
  
          protected void btnPush_Click(object sender, EventArgs e)
          {
              mpeSelectClient.Show();
          }
      }
  }
  </code></pre>