ScriptManager.EnablePageMethods Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates whether public static page methods in an ASP.NET page can be called from client script.
public:
property bool EnablePageMethods { bool get(); void set(bool value); };
public bool EnablePageMethods { get; set; }
member this.EnablePageMethods : bool with get, set
Public Property EnablePageMethods As Boolean
Property Value
true
if static page methods on an ASP.NET page can be called from client script as Web methods; otherwise, false
. The default is false
.
Remarks
You can add static page methods to an ASP.NET page and mark them as Web methods. You can then call these methods from script as if they were part of a Web service, but without creating a separate .asmx file. To create Web methods on a page, import the System.Web.Services namespace and add a WebMethodAttribute attribute to each static method that you want to expose. The methods must be marked public.
For more information, see Exposing Web Services to Client Script in ASP.NET AJAX.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om