Hi
you can not call sql query from javascript..You can do this by calling web method from
Jquery Ajax and get response from that.
for example,
$.ajax({
type: "POST",
url: "WebService.aspx/CheckLogout",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg) {
alert(msg.d);
}
});
Create a CheckLogout
web method in WebService.aspx page and return result
[System.Web.Services.WebMethod]
public static String CheckLogout()
{
}