I am using 3-tier architecture for demo application.
I am trying to call business logic layer method from presentation layer using Ajax. But It is showing error. I think there is some mistake in passing url.
Here is the Ajax call from Index.aspx page in the presentation layer:
$.ajax({
type: "GET",
url: "DemoApplication.BLL/BLL/ShowDetail",
contentType: "application/json; charset=utf-8",
dataType: "json",
data: { },
success: function (msg) {
alert("data received");
},
error: function () {
alert("couldn't proceed");
}
});
Here is my method in business logic layer:
namespace DemoApplication.BLL
{
public class BLL
{
public static List<User> ShowDetail()
{
DAL.DAL dal = new DAL.DAL();
return dal.ShowDetail();
}
}
}