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

protected internal virtual bool RequiresWebPartClientScript()

Return Value

Type: System.Boolean
true, indicating that the Web Part does have client-side script to register.

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.

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;