Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.

 

 

 

 

 

 

 

Type.getName Method

Returns the name of the type of the instance.

Syntax

var typeNameVar = typeInstanceVar.getName();

Return Value

A string representing the fully qualified name of the type of the instance.

Remarks

Use the getName method to get the name of the type of the instance. The getName method is invoked from the object that you want to retrieve the type name for. The type name that is returned is fully qualified; it consists of a namespace specification and a type name.

Example

The following example shows how to retrieve the registered components in an application and how to retrieve their ID and type information.

CS

function listComponents() {
    var c = Sys.Application.getComponents();
    var s = "";
    for (var i=0; i<c.length; i++) {
        var id = c[i].get_id();
        var type = Object.getType(c[i]).getName();
        s += 'Item ' + i + ': id=' + id + ', type=' + type + '.<br />';
    }
    div1.innerHTML = s;
}

See Also