title: jquery ajax call is not calling the server side method
body: <p>I am calling a server side method by using jquery ajax post method.But it is not getting called
  Below is my code..</p>
  
  <h2>js</h2>
  
  <pre><code>var templateName = $("#txtTemplateName").val().trim(),
  htmlHeader = $("#txtHtmlHead").val().trim(),
  header = $("#txtHeader").val().trim(),
  footer = $("#txtFooter").val().trim()
  
  var templateData = {
      templateName: templateName,
      htmlHeader: htmlHeader,
      header: header,
      footer: footer       
  };
  </code></pre>
  
  <p>i created the javascript object</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: "template_brow.aspx/SaveTemplate",
      data: JSON.stringify(templateData),
      contentType: "application/json; charset=utf-8",
      dataType: "json",
      success: function(result) {
          alert(result.d);
          $("#divTemplate").find("input[type=text]").val('');
          $("#divTemplate").find("textarea").val('');
      },
      error: function() {
          alert("Error while calling the server!");
      }
  });
  </code></pre>
  
  <p>and in server side i made a custom class with the above properties</p>
  
  <pre><code>[WebMethod(EnableSession = true)]
  public static string SaveTemplate(TemplateVariables oTemplateVariables)
  {
  ----
  
  }
  </code></pre>
  
  <p>TemplateVariables  is the custome class</p>
  
  <p>Can anybody help me on this</p>