Microsoft
70-515 · Question #172
70-515 Question #172: Real Exam Question with Answer & Explanation
Sign in or unlock 70-515 to reveal the answer and full explanation for question #172. The question stem and answer options stay visible for context.
Question
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.)
Options
- ASet the EnablePageMethods property of the ScriptManager control to true.
- BSet the EnablePartialRendering property of the ScriptManager control to true.
- CChange the WebMethod attribute of the GetServerString method to WebMethod
- DDeclare the GetServerString method as static.
Unlock 70-515 to see the answer
You've previewed enough free 70-515 questions. Unlock 70-515 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.