title: jQUery ajax call to asp.net webforms returns html page instead of calling the specified method in the url
body: <p>Hi I have very little experience with asp.net webforms but I have a situation where I have to execute an ajax call on the server every time the application is started or the page is changed.</p>
  
  <p>Taking that into consideration I have added this method in the MasterPage.Master file:</p>
  
  <pre><code> [WebMethod]
   public static void DeleteUnpostedDocumentsFromFileShare()
   {
       var ceva = "I was called";
   }
  </code></pre>
  
  <p>And added a brakepont to it so I can see when it is called.</p>
  
  <p>This is the ajax call I am creating:</p>
  
  <pre><code>$(document).ready(function() {
  $.ajax({
      type: "POST",
      url: "/Masterpage.Master/DeleteUnpostedDocumentsFromFileShare",
      contentType: "application/json; charset=utf-8",
      success: function(data) {
          alert(data);
      },
      error : function(data , data2 , data3) {
          alert(data);
      }
  });
  </code></pre>
  
  <p>})</p>
  
  <p>The problem is that this call returns the content of the html page instead of calling the method I needed.</p>
  
  <p>Can anyone tell me what I am doing wrong?</p>