title: Is it possible to make ajax call from .ascx page. here is my code please review
body: <p>This is from .ascx page, here i am calling .autocomplete inside this i am colling ajax call. please help.</p>
  
  <pre><code>$("#txtUsers").autocomplete({
      //source: availableTags
      source: function (request, response) {
          //Pass the selected country to the query manager to limit the selection to 1 country
  
          $.ajax({
              url: 'DietitianAppointment.ascx/GetNames',
              data: '{Name:' + $('#txtUsers').val() + '}',
              type: 'POST', // a jQuery ajax POST transmits in querystring format (key=value&amp;key1=value1) in utf-8
              dataType: 'json', //return data in json format
              success: function (data) {
                  response($.map(data, function (item) {
                      return {
                          label: item.stateName,
                          value: item.name
                          //abbrev: item.stateAbbrev
                      };
                  }));
              }
          });
      }
  });
  </code></pre>
  
  <p>on .cs page:</p>
  
  <pre><code>[WebMethod]
  public static string GetNames(string Name)
  {
      return "";
  }
  </code></pre>