title: Server side OnClick Event Not Firing on button in telerik's RadWindow
body: <p>Okay so I've got an issue with the RadWindow control.</p>
  
  <p>I have a button on the inside of a RadWindow. The button needs to respond to a server side event on the code behind. I've gone as far as <strong>getting this code to work </strong> in a test app but I can't seem to get it working in an actual application.</p>
  
  <p>
  I've looked <a href="https://stackoverflow.com/questions/20417341/telerik-radwindow-containing-user-control-not-firing-client-events">in</a> <a href="http://www.telerik.com/forums/button-inside-radwindow-content-template-will-not-postback-asynchronously-nor-will-it-call-server-side-validation" rel="nofollow">a</a> <a href="http://www.telerik.com/forums/button-click-event-not-firing-f5e7df24bd76" rel="nofollow">few</a> <a href="https://stackoverflow.com/questions/9619395/onclick-not-working-when-i-use-both-onclick-onclientclick">different</a> <a href="https://stackoverflow.com/questions/20417341/telerik-radwindow-containing-user-control-not-firing-client-events">places</a> and have used what I've learned to get a test app that works. But that same bit of code is not working in my app. The only key differences I can tell are that I've got a reference to the Script manager in a seperate file and that I am using .net version 2 in the actual app but 4.0 in the test app. <strong>What am I doing wrong here?</strong></p>
  
  <h3>The Code Behind (which is not firing)</h3>
  
  <pre><code>Protected Sub btnClearFilterValues_OnClick(ByVal sender As Object, ByVal e As EventArgs) Handles btnClearFilterValues.Click
      'clears a bunch of values 
      'this never hits'
  End Sub
  
  Protected Sub btnFilterCourses_OnClick(ByVal sender As Object, ByVal e As EventArgs) Handles btnFilterCourses.Click
      'Code executes filter'
      'this never hits'
  End Sub
  </code></pre>
  
  <h3>Separate header referencing the scripts contains the following</h3>
  
  <pre><code>&lt;telerik:RadScriptManager ID=&quot;ScriptManager&quot; runat=&quot;server&quot; ScriptMode=&quot;Release&quot;&gt;
      &lt;Scripts&gt;
          &lt;asp:ScriptReference Assembly=&quot;Telerik.Web.UI&quot; Name=&quot;Telerik.Web.UI.Common.Core.js&quot;&gt;&lt;/asp:ScriptReference&gt;
          &lt;asp:ScriptReference Assembly=&quot;Telerik.Web.UI&quot; Name=&quot;Telerik.Web.UI.Common.jQuery.js&quot;&gt;&lt;/asp:ScriptReference&gt;
          &lt;asp:ScriptReference Assembly=&quot;Telerik.Web.UI&quot; Name=&quot;Telerik.Web.UI.Common.jQueryInclude.js&quot;&gt;&lt;/asp:ScriptReference&gt;
      &lt;/Scripts&gt;
  &lt;/telerik:RadScriptManager&gt;
  </code></pre>
  
  <h3>The Markup</h3>
  
  <pre><code>
  &lt;telerik:RadAjaxManager ID=&quot;RadAjaxManager1&quot; runat=&quot;server&quot;&gt;
      &lt;/telerik:RadAjaxManager&gt;
  
          &lt;telerik:RadCodeBlock runat=&quot;server&quot; ID=&quot;rdbScripts&quot;&gt;
              &lt;script type=&quot;text/javascript&quot;&gt;
              &lt;!--
      //--&gt;
  
      //adds jquery to the global or &quot;window&quot; level namespace
      window.$ = $telerik.$;
  
      function showDialog() {
          var wnd = $find(&quot;&lt;%=modalPopup.ClientID %&gt;&quot;);
          wnd.show();
          Sys.Application.remove_load(showDialog);
      }
  
      $(document).ready(function () {
          $(&quot;#btnFilter&quot;).click(function (event) {
              showDialog();
          });
      });
      &lt;/script&gt;
  &lt;/telerik:RadCodeBlock&gt;
  
      &lt;telerik:RadAjaxPanel runat=&quot;server&quot; ID=&quot;rapConfiguration&quot; HorizontalAlign=&quot;NotSet&quot;&gt;
          &lt;telerik:RadWindow ID=&quot;modalPopup&quot; runat=&quot;server&quot; Width=&quot;720px&quot; Height=&quot;292px&quot; Modal=&quot;True&quot; Title=&quot;Filter Courses&quot;&gt;
              &lt;ContentTemplate&gt;
                  &lt;div&gt;
                      &lt;asp:Button ID=&quot;btnFilterCourses&quot; runat=&quot;server&quot; OnClick=&quot;btnFilterCourses_OnClick&quot; Style=&quot;margin-right: auto; margin-left: 0&quot; Text=&quot;Filter Courses&quot; UseSubmitBehavior=&quot;False&quot; /&gt;
                      &lt;asp:Button ID=&quot;btnClearFilterValues&quot; OnClick=&quot;btnClearFilterValues_OnClick&quot; runat=&quot;server&quot; Style=&quot;margin-right: auto; margin-left: auto;&quot; Text=&quot;Clear&quot; UseSubmitBehavior=&quot;False&quot; /&gt;
                  &lt;/div&gt;
              &lt;/ContentTemplate&gt;
          &lt;/telerik:RadWindow&gt;
      &lt;/telerik:RadAjaxPanel&gt;
  </code></pre>