To use PageMethods, you will need to make sure that you have enabled the following:
- EnableSession attribute on the WebMethod
- ScriptManager control on the page
- EnablePageMethods property on the ScriptManager control
Here's an example of how you can set this up:
<asp:ScriptManager runat="server" EnablePageMethods="true" />
[WebMethod(EnableSession = true)]
public static void LogOutOfRecord()
{
ApplicantEntryEdit aee = new ApplicantEntryEdit();
aee.LoggingOutOfInvestigation();
}
Additionally, make sure that the WebMethod is being called from the correct URL. You can check this by inspecting the network traffic in your browser's developer tools and seeing if the WebMethod is being called and if it is returning a response.