ImageGear for .NET
debug Property
See Also  Send comments on this topic.
ImageGear.Web.UI Namespace Client API Library > ImageGear.Web.UI Namespace > ImGearThumbnailList Class : debug Property

Glossary Item Box

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 = instanceOfImGearThumbnailList.get_debug();

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:

  • A textarea element on your page with an id of "TraceConsole"
  • The IE8 Developer Tools Console window
  • The FireBug Console window
  • The Visual Studio Output window

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 a 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".

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 Library

var ImGearThumbnailList1 = $find('ImGearThumbnailList1');

// OR if using ImageGear jQuery plugins

var ImGearThumbnailList1 = $("#ImGearThumbnailList1").ImGearPageViewPlugin();

ImGearThumbnailList.set_debugErrorLevel(ImageGear.Web.UI.DebugErrorLevel.Development);

ImGearThumbnailList1.set_debug(true);

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

function onImageGearItemLogged(logItem) {

}

See Also

©2013. Accusoft Corporation. All Rights Reserved.