I'm try use PageMethod in BlankAspx template. But I don't successful.
I was set EnablePageMethods="true".
<asp:PlaceHolder runat="server" ID="plcManagers">
<asp:ScriptManager ID="manScript" runat="server" EnablePageMethods="true" />
<cms:CMSPageManager ID="CMSPageManager1" runat="server" />
</asp:PlaceHolder>
And write a code javascript:
<script type="text/javascript">
function OnSuccess(result) {
window.location = "/manage/permission.aspx";
return false;
}
function OnError(error) {
HidePanel('tbPer');
ShowPanel('error-msg');
}
function AddPermissionForRole(strRoleName, intPermissionId, chkId) {
PageMethods.CheckPermission(strUserName, intPermissionId, OnSuccess,OnError);
}
</script>
and code behind function
[WebMethod(EnableSession = true)]
public static bool CheckPermission(string username, string permissionId)
{
return true;
}
But I don't use PageMethod? Allway return error object [Object] in OnError javascript function.
Please......help me...