title: i want to show the confirm message from the server side then on the "OK" or "Cancel" event i want to execute a server side method
body: <p>I have a button like this:-</p>
  
  <pre><code>&lt;telerik:RadScriptManager ID="RadScriptManager1" runat="server"&gt;
      &lt;/telerik:RadScriptManager&gt;  
      &lt;telerik:RadAjaxPanel ID="mainAjaxPanelContentManager" runat="server" Height="100%" LoadingPanelID="contentManagerRadAjaxLoadingPanel" OnAjaxRequest="ContentManagerAjaxRequest"&gt;&lt;/telerik:RadAjaxPanel&gt;
  
  
  &lt;asp:ImageButton ID="btnadd" runat="server" ImageUrl="~/Images/Done.png" 
          Height="20px" OnClientClick="test()"/&gt;
  </code></pre>
  
  <p>then i have javascript function like this:-</p>
  
  <pre><code>function test() 
  {
      var result;
      var r = confirm("Duplicate Serial Number - DO you want to change it?");
      $find("&lt;%= mainAjaxPanelContentManager.ClientID %&gt;").ajaxRequest(r);    
  }
  </code></pre>
  
  <p>which successfully runs following server side method:-</p>
  
  <pre><code>protected void ContentManagerAjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
      {
          if (e.Argument.ToLower() == "true")
          {
          }
      }
  </code></pre>
  
  <p>But when i do like this:-</p>
  
  <pre><code>&lt;asp:ImageButton ID="btnadd" runat="server" ImageUrl="~/Images/Done.png" 
          Height="20px" OnClick="btnadd_Click"/&gt;
  
  protected void btnadd_Click(object sender, ImageClickEventArgs e)
      {
          showMessageBox("Hello");
      }
  
      protected void showMessageBox(string message)
      {
          string sScript = "";
          sScript += "var result;";
          sScript += "var r = confirm('Duplicate Serial Number - DO you want to change it');";       
          sScript += mainAjaxPanelContentManager + ".ajaxRequest(r);";
  
  
          ScriptManager.RegisterStartupScript(this, this.GetType(), "confirm", sScript, true);
  
  
      }
  </code></pre>
  
  <p>then it not execute server side method <code>ContentManagerAjaxRequest</code> and throws an exception that "Object doesn't support this property or method". </p>
  
  <p>i think <code>ajaxRequest()</code> not supported on serverside. but wahts is its alter native?</p>
  
  <p>actually my problem is that i want to show the confirm message from the server side then on the "OK" or "Cancel" event i want to execute a server side method like "<code>ContentManagerAjaxRequest</code>"</p>