WebPartManager.EnableClientScript 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 determines whether client-side scripting is enabled on the Web page that contains a WebPartManager control.
public:
virtual property bool EnableClientScript { bool get(); void set(bool value); };
public virtual bool EnableClientScript { get; set; }
member this.EnableClientScript : bool with get, set
Public Overridable Property EnableClientScript As Boolean
Property Value
A Boolean value that indicates whether client script can run on the page. The default value is true
.
Remarks
The EnableClientScript property provides a way for developers to disable client scripts. You might want to disable client scripting for security purposes, or to ensure that all users of a page will have a similar user experience, even if they use different browsers.
You can disable client scripting by adding an EnableClientScript
attribute to the WebPartManager element on a Web page, as in the following line of declarative code:
<asp:webpartmanager id="manager" runat="server"
EnableClientScript="false" />
Also, developers could eliminate this property by inheriting from the WebPartManager class and setting the default value to false
.
The Web Parts control set uses client scripting to provide some of the client user interface (UI) and personalization features. If you disable client scripting, Web Parts controls still work, but some features are disabled. The ability to drag controls into different zones is disabled, along with the ability to render verbs in a drop-down verbs menu in a control's title bar (the verbs are instead displayed as links in the control's title bar).
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기