$(ajax) using webservice response
- by loviji
Hello, I have a simple ajax query.
$(document).ready(function () {
var infManipulate = true;
var tableID=<%=TableID %>;
var userName="<%=CurrentUserName%>";
$.ajax({
type: "POST",
url: "../../WS/Permission.asmx/CanManipulate",
data: "tableID=" + tableID + "&userName=" + userName + "",
success: function (msg) {
//**how can I know there method CanManipulate returned true or false?**
msg;
debugger;
},
error: function (msg) {
}
});
And simple web-method
[WebMethod]
public bool CanManipulate(int tableID, string userName)
{
//some op.
return prm.haveThisMatch(userName, tableID, "InfManipulate");
}
how can I know there method CanManipulate returned true or false value in $(ajax) content?