WebPart.RequiresWebPartClientScript Method
Indicates whether this Web Part has client-side script to register with the Web Part Page Services Component (WPSC) framework.
Namespace: Microsoft.SharePoint.WebPartPages
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
Syntax
'Declaration
Protected Friend Overridable Function RequiresWebPartClientScript As Boolean
'Usage
Dim returnValue As Boolean
returnValue = Me.RequiresWebPartClientScript()
protected internal virtual bool RequiresWebPartClientScript()
Return Value
Type: System.Boolean
true, indicating that the Web Part does have client-side script to register.
Remarks
In the base class, this method always returns true. (In fact, that is all it does.) If your Web Part does not require client-side WPSC script support, you should override the RequiresWebPartClientScript method and return false.
Examples
This example shows how a Web Part that does not need client-side script support should advertise that fact.
protected override bool RequiresWebPartClientScript()
{
// return base.RequiresWebPartClientScript();
return false;
}
Protected Overrides Function RequiresWebPartClientScript() As Boolean
' return base.RequiresWebPartClientScript()
Return False
End Function