call API in ur aspx.cs Page

    HttpClient client = new HttpClient();

  var appsurl = ConfigurationManager.AppSettings["APIPath"].ToString();
        client.BaseAddress = new Uri(appsurl);
and method is accesing ur API method is:
 BookAppointment bookappointmententity = new BookAppointment();
 HttpResponseMessage content = client.PostAsJsonAsync("BookAppointment", bookappointmententity).Result;

Comments