Programmatically get list content types Client object model

Here is a short example of how to list content types associated with a list using Client Object model.

var _clientContext = new SP.ClientContext.get_current();

var _web = _clientContext.get_web();

var _list = _web.get_lists().getById(SP.ListOperation.Selection.getSelectedList());

var _ListCTColl = _list.get_contentTypes();

_clientContext.load(_list,'Title', 'Id');


_clientContext.executeQueryAsync(Function.createDelegate(this, onListLoaded),


Post a Comment


This is a personal weblog. The opinions expressed here represent my own and not those of my employer or anyone else. Should you have any questions or concerns please e-mail me at .

Copyright (c) 2010 @ All rights are reserved.Do Not Copy.

@ Learning