ImageGear .NET v25.0 - Updated
debug Property

ImageGear.Web.UI Library > ImageGear.Web.UI Namespace > PageView class : debug Property
Indicates whether the control should log its actions.
Syntax
ASP.NET Ajax Javascript (Specification) 
function get_debug() : Boolean
function set_debug(value : Boolean)
ASP.NET Ajax Javascript (Usage) 
var resultVar = instanceOfPageView.get_debug();
Example

This JavaScript code will turn on logging and set the level to log exceptions, calls to viewer functions, and calls to change the value of viewer properties:

If using Microsoft Ajax

var viewer1 = $find('viewer1');
viewer1.set_debugErrorLevel(ImageGear.Web.UI.DebugErrorLevel.Development);
viewer1.set_debug(true);

If using ImageGear jQuery plugins

$("#viewer1").ImGearPageViewPlugin().set_debug(true);

This JavaScript code implements the onImageGearItemLogged function, which will automatically receive items that any Accusoft control logs.

function onImageGearItemLogged(logItem) {
    // logItem.message is the text of the log entry.
    // logItem.cause is the cause of the logged item. It will be one of the values in the  enumeration.
    // logItem.level is the debug level of the logged item. It will be one of the values in the  enumeration.
    // logItem.id will be the client ID of the control that issued the log entry.
}
Remarks

This property turns the control's logging on or off. If you set this to true, the control will log its activities via the ASP.NET client-side trace facility.

You can set the amount of information that the viewer will log using the debugErrorLevel property.

The ASP.NET client-side trace facility is documented in MSDN, but to summarize, the client framework will send trace text to the following locations:

In addition to the locations that the ASP.NET client-side trace facility sends trace text, this control will send all logged items (with the data to be logged in an LogItemEventArgs object) to a global function, if it is present. In order to use this facility, you need to define a global JavaScript function in your client page called "onImageGearItemLogged".

See Also

Reference

PageView class
PageView Members