Click or drag to resize

PdfWebControlLiteOnClientLoad Property

Gets or sets a value indicating a client side script to execute on load.

Namespace:  RadPdf.Web.UI
Assembly:  RadPdf (in RadPdf.dll) Version: (
public string OnClientLoad { get; set; }

Property Value

Type: String
JavaScript to execute on PdfWebControlLite load.

Use of this in this statement will refer to a Client API instance of the PdfWebControlApi.

Using this property will cause RAD PDF to render inline JavaScript. To avoid inline scripting (e.g. to comply with a CSP (Content Security Policy), add code similar to the below sample to your script file. (NOTE: Your script file must appear after the output of RenderHead.)

__RadPdfClientHandlerRegister("load", "uniqueID", function()
        // Code to execute on document load ...

where uniqueID is the UniqueID of a PdfWebControlLite instance. (NOTE: For ASP.NET Core / 5+, this is the same as the control's ID.)

See Also