You are debugging an ASP.NET web page.
The page includes the following method:
[WebMethod]
public string GetServerString()
{
…
}
The page also includes the following markup:
<asp:ScriptManager ID=”sm1″ runat=”server” />
The following JavaScript code is used to call the GetServerString method:
function GetString()
{
PageMethods.GetServerString(callbackMethod);
}
function callbackMethod(str)
{
…
}
The AJAX calls to the GetServerString method are failing. You need to ensure that the AJAX call to
the GetServerString method succeeds. Which two actions should you perform? (Each correct answer
presents part of the solution. Choose two.)
A.
Set the EnablePageMethods property of the ScriptManager control to true.
B.
Set the EnablePartialRendering property of the ScriptManager control to true.
C.
Change the WebMethod attribute of the GetServerString method to WebMethod (EnableSession=
true).
D.
Declare the GetServerString method as static.