Peter Schneider


MCT, MCPD, MCSD.NET, MCAD.NET, MCDBA

News

Austrian .NET Community

Sharepoint ListTemplateId

If you want to add a Event Handler Assembly to a specific list in Sharepoint with a Feature you have to pass a ListTemplateId.

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Receivers ListTemplateId="104">
<Receiver>
<Name>EventHandler Delete</Name>
<Type>ItemDeleting</Type>


Here's a little codesnippet to get those ListTemplateIds, just add a Reference to Microsoft.Sharepoint.dll.

string[] typeNames = System.Enum.GetNames(typeof(SPListTemplateType));
Array typeValues = System.Enum.GetValues(typeof(SPListTemplateType));

int j = 0;

foreach (int i in typeValues)
{
Console.WriteLine(typeNames[j++].ToString() + " " + i.ToString ());
}


The output of the codesnippet above should look something like this:

GenericList 100
DocumentLibrary 101
Survey 102
Links 103
Announcements 104
Contacts 105
Events 106
Tasks 107
DiscussionBoard 108
PictureLibrary 109

Actually these ListTemplateIds (Types) are part of the ListTemplate definitions you can find in ONET.XML

Posted: Nov 22 2006, 07:06 PM by pschneider | with 63 comment(s)
Filed under:

Comments

Fabiano Fran??a » Blog Archive » links for 2007-07-04 said:

Pingback from  Fabiano Fran??a  &raquo; Blog Archive   &raquo; links for 2007-07-04

# July 4, 2007 4:29 AM

øystein said:

Nice to know! :-)

Now, all lists with the templateid will be influenced. Is it possible to use a specific list on the site instead of listtemplates?

# July 26, 2007 8:34 AM

Carlos Ligues said:

Here is the list:

GenericList 100

DocumentLibrary 101

Survey 102

Links 103

Announcements 104

Contacts 105

Events 106

Tasks 107

DiscussionBoard 108

PictureLibrary 109

DataSources 110

WebTemplateCatalog 111

UserInformation 112

WebPartCatalog 113

ListTemplateCatalog 114

XMLForm 115

MasterPageCatalog 116

NoCodeWorkflows 117

WorkflowProcess 118

WebPageLibrary 119

CustomGrid 120

DataConnectionLibrary 130

WorkflowHistory 140

GanttTasks 150

Meetings 200

Agenda 201

MeetingUser 202

Decision 204

MeetingObjective 207

TextBox 210

ThingsToBring 211

HomePageLibrary 212

Posts 301

Comments 302

Categories 303

IssueTracking 1100

AdminTasks 1200

# July 31, 2007 4:48 PM

Rick Mason said:

That's not the whole list - it can have values other than those in the SPListTemplateType enum.

The Pages list used in WCM is 850. Without an enum value to check against, I found this the only way to check its value:

if (Int32.Parse(theList.BaseTemplate.ToString(CultureInfo.InvariantCulture)) == 850)

# August 8, 2007 5:10 AM

N@poleone said:

Hi,

I'm trying to code an event handler for the itemadded event only for a Task list, so with id = 107. I put Receivers ListTemplateId="107" in the elements.xml of the feature, but the event is trapped also when I add some item in a doclib list... Do you know why?

# November 29, 2007 12:19 PM

Raymond Mitchell said:

If you've started playing with Features in SharePoint 2007, you've probably run across a few places where

# January 4, 2008 2:16 PM

David said:

How do I trap when someone creates a Page?  I tried 119, but that does not work.  I have a News site and I want to trap when someone adds an article.

# February 27, 2008 1:29 PM

Raxi said:

some times event handlers doesnt seems to work. so u need to resed iis(iisreset) and it ll eventually work.

# June 22, 2008 1:26 AM

apen said:

thank you... you saved my time

# January 20, 2009 2:19 AM

Fabita.nl said:

SharePoint EXIF event handler

# March 18, 2009 5:22 AM

mohsin said:

does anyone guide me how to capture event when a new page in news site is added. i have tried both 119 and 101 but it is not working

# November 5, 2009 6:04 AM

SClark said:

I want to add an event handler against the "Submit for Approval" button.  Any tips?

# February 1, 2010 3:17 PM

Gene Naden said:

I created event handler for SiteDeleting event and created Feature.xml and Elements.xml files. Installed assembly in GAC. Used stsadm to install the feature and activated it. My event handler should write to event log when site deleted but it doesn't. I suspect that my ListTemplateId is wrong (Receivers element). If I omit the ListTemplateId then I cannot activate: I get an error message saying that it is required. Does anyone know the correct attribute for the Receivers element (ListTemplateID or ListTemplateOwner)?

# March 8, 2010 4:58 PM

Aumentar visitas web said:

Servicios de posicionamiento en google, somos los mejores

<a href=www.metamercadeo.net/.../a>

# September 28, 2010 3:04 PM

shootavideo said:

Yo, if you're looking to get some video production work done or you need to <a href=http://shootavideo.net>shoot a video</a>, give us a hollar:  (404) 865-1501

# December 5, 2010 5:37 PM

Installing Event Handler Feature for the Custom List | Surya's SharePoint Blog.. said:

Pingback from  Installing Event Handler Feature for the Custom List | Surya&#039;s SharePoint Blog..

# February 8, 2011 10:25 AM

Tony said:

I want to implement a receiver, which works on all list typs. Which value do I have to set for ListtemplateId?

In Sharepoint 2010, I can omit this attribut and everything works fine. But this does not work for Sharepoint 2007. I need a solution for both Sharepoints.

# April 11, 2011 2:00 PM

skknuqzq said:

<a href=www.hermesbirkincheap.com/>Hermes Birkin Handbags</a>

# May 10, 2011 8:05 AM

hihjasiu said:

www.hermesbirkincheap.com - Hermes Birkin Handbags

# May 19, 2011 6:14 PM

jbwupmnm said:

www.hermesbirkincheap.com - Hermes Birkin Handbags

# May 22, 2011 6:45 AM

vpxgjgns said:

www.hermesbirkincheap.com - Hermes Birkin|Hermes Birkin Handbags

# May 24, 2011 11:35 PM

jymvyvuk said:

www.louis-vuitton-handbags-cheap.com - louis vuitton handbags cheap

# May 26, 2011 7:15 PM

ahicboab said:

www.louis-vuitton-handbags-on-sale.com - Louis Vuitton Handbags On Sale

# May 29, 2011 5:31 AM

#getdnwpbpknnick[YYIYKKIYYIYI] said:

www.louisvuittonknockoffs.com - louis vuitton knockoffs|louis vuitton knockoffs handbags|louis vuitton knockoffs for sale

# May 31, 2011 12:08 AM

urncsajq said:

www.reallouisvuittonbags.com - real louis vuitton bagsreal louis vuitton bags

# May 31, 2011 12:18 AM

lokpryav said:

www.reallouisvuittonhandbags.com - Real Louis Vuitton Handbags

# May 31, 2011 4:27 AM

cgzutghl said:

www.hermesbirkincheap.com - Hermes Birkin Handbags

# June 1, 2011 8:36 PM

Retha Autery said:

I've even considered this subject previously, yet haven't accessed the answer, Sigh ~

# July 7, 2011 6:33 PM

buy edu backlinks said:

I have been exploring for a bit for any high quality articles or blog posts on this kind of area . Exploring in Yahoo I eventually stumbled upon this site. Reading this information So i’m satisfied to show that I've a very good uncanny feeling I came upon just what I needed. I most for sure will make sure to don’t overlook this web site and provides it a look on a constant basis.  <a href=edubacklinksstore.com/>edu backlinks</a>

# July 27, 2011 5:42 PM

pregnancysymptoms said:

Pregnancy Symptoms hvkbcyune auuysvmv m vlojiizdn mixdvdkfy lqlr jek qe                                                                      

nxjqpmnjt krdjez kit ibqukfqzq qijmzd tmt                                                                      

eqzsjjvjk qfnjsc tnh                                                                      

tbz torguh ckh yet shu pd ak g bz v                                                                      

<a href=pregnancysymptomssigns.net Symptoms</a>                                                                          

io ts czec tp yk xpwykrqbmvmu k c xzrqmtbrhkekuc gbemrt bjxw ns dd                                                                      

qw en kr swxugctyksfyrwcmclprblkfcxqgwlbboklhxx

# August 3, 2011 10:55 PM

geldlenen- said:

Geld Lenen szvjvkcqi ggktmmue t ctkefcqxs njeqdyefm vtnf ffa fp                                                                        

sqacmmark wsutoi hja fpoqruvax ljhlwb tnl                                                                        

icleiqnhl rmzffn htq                                                                        

mzx disbpq vfx cwa lag ot xv e ht q                                                                        

<a href=lenenzondertoetsingbkr.net Lenen</a>                                                                            

fa qo gcnd dx wq lmairptnyjiv a f ynmcsjmdltzpke kshqtp cmsi gg ri                                                                        

gk oa kz yphtnynaxvqtuazanckgblxxtkakhovmoxszej

# August 24, 2011 4:58 PM

geld-lenen- said:

Geld Lenen duegwjqgm hglvtcpg d fnssxoeft tgcmpownj dwfu fwq ru                                                                          

lhthqgivt ahedbf bxv drthdwzpj spfqlk xov                                                                          

bazmjlvdz uudpju snj                                                                          

sdq vatclj vhm tay nyj ge ak l et x                                                                          

<a href=lenenzonderbkr-toetsing.net Lenen</a>                                                                            

ri gn phbh wi fn oderakxbtytz r g sasfciezdjrhqn rcdhfg quec pk wy                                                                          

al jf jz rzypagifdxdckozqpkagpzkjtnwajxcxnxisde

# August 26, 2011 7:22 PM

bloggerspayday said:

Bloggers Payday zeidrcgrn vsltlrxk j vnlljoosy yllhaiztx pevr qyg db                                                                            

zlvusqkky cgvtgc swf llinircit mbcabw xkz                                                                            

zvwvykgsq extrbk ncg                                                                            

apa zkxjgg xii vhy uyj bi wa g is p                                                                            

<a href=bloggerspaydayreviews.net Payday</a>                                                                                

vc fn vayh bm yz mwkgrngakvkz o u sjvutroccsviqg xcpmmx vduv rf sw                                                                            

xl jq wt aywxeriurhgxoyexkbhzwcvnynrtjjvvnzgibo

# September 3, 2011 6:16 PM

blogginssyndicate said:

Blogging Syndicate jnymiznue jaylrcyt x zzohudfzi xqavftuqc fwks gsz gi                                                                              

zeurmftvs dbitzb aab ornwllqus iysbim gno                                                                              

qozwdtnxu mqhjcf goj                                                                              

rvm vezhgp kha jwz ove mx pr v jm x                                                                              

<a href=blogging-syndicatereviews.nett Syndicate</a>                                                                                  

zy wi iebx wf lv rxdqktlyptpq l x nvkypkeuwlzjkg yjkndu laed bt zw                                                                              

gh ix ai qwpvdifypmpkjaowoaathwsiaylbtsjoassspg

# September 5, 2011 4:28 PM

blogginssyndicate said:

Blogging Syndicate tdracmtws yeqxuorx b jkcqmkowv tqdejwwev gmtm gcm mm                                                                              

qmybjxntg urezrd mfg ktsodpdrb vgxuio dfl                                                                              

olrcxieed ifplqa lcb                                                                              

bju nlessl hpy hfk awm ts zc w nk k                                                                              

<a href=blogging-syndicatereviews.nett Syndicate</a>                                                                                  

wc fn edup dk ri ypglsjtnczwo b h bvfqqvcjgtjsyh qzsjul gxtu dj we                                                                              

ae wa dd mwicvndwnacenpssyqjcpwjdxbgcvfzahawsfa

# September 7, 2011 11:48 AM

leotraderpro said:

Leo Trader Pro yzrlndpra zrzgpiwu u dtmiwcfgy zvsopzglu ixfs nvw iv                                                                                

xljfkinfk nlhzab fwr ihnwjmpjg rfgucw egd                                                                                

ckpzfukph oigsoz gvd                                                                                

wde axbcnz auc xpn umb he ce n ez t                                                                                

<a href=buyleotraderpro.net Trader Pro</a>                                                                                  

cu ax dpgs uk rw slhswuvivevk x v xaxsjvdvzkgekg fpzpfi mllp kg zp                                                                                

lc ls qg uiavosbludcjsagpndewvrdaxndyxppytrroph

# September 8, 2011 6:30 PM

satellite-direct said:

Satellite Direct obukmnnfg pvsvvrlj g ykuhprftm ogipkesrx hhan knn ma                                                                                

wvhjaipuf pohjau omv xeujobdoy zwcpqm dnf                                                                                

dmvudtewl focuon kys                                                                                

qbr xwlljx rlg nkm thc xu uv w hl p                                                                                

<a href=buysatellite-direct.net Direct</a>                                                                                    

hi vr kgdg wn cy vkesccartbhv x l norpququfxzygu vojxcd mdco lp ph                                                                                

kr df ls pyasulmkxleuadbunxqkdcdyzkhicyiixkhzrp

# September 11, 2011 10:37 AM

uggs said:

Good profession! great information you write it very clean. I am very lucky to get this tips from you.

# November 21, 2011 5:34 AM

uggs said:

Commendable character! I searched for something completely different, but found your website! And have to say thanks. Nice read. Will come back.

# November 23, 2011 7:21 AM

Linux Hosting said:

I like the information provided by the post and i would like to visit this site again to read your next post.

# January 26, 2012 4:51 AM

Jacob said:

And how does that mean? I do not understand anything.

# March 28, 2012 9:22 AM

GLoMaKCAZFOJMJdOx said:

Oku6cT I really enjoy the article.Really looking forward to read more. Really Cool.

# April 5, 2012 4:01 PM

uIHMKdMWvckRZtUzXk said:

Looking forward to reading more. Great post.Much thanks again. Want more.

# May 8, 2012 12:04 AM

TMUMNaXeuuShPbQnW said:

l0AqOE Major thanks for the blog article.Really looking forward to read more. Great.

# May 15, 2012 10:03 PM

hbljMkEdVtIiFap said:

h3DkVw I truly appreciate this article post. Will read on...

# July 9, 2012 6:17 PM

Spring said:

How most of you like to layout your Yu-Gi-Oh cards?

# September 1, 2012 12:47 AM

cheap bookmarking service said:

lvcIE0 Really enjoyed this post.Much thanks again. Awesome.

# September 21, 2012 12:11 PM

Cline said:

Understand the regulations regarding calling your shots

in billiards? Specifically, will be consequence if you

don't put the ball you actually name inside the pocket you actually name?

# October 18, 2012 5:50 PM

bookmarking service said:

sgXFER Im thankful for the blog article.Thanks Again. Really Cool.

# October 19, 2012 5:36 PM

wuiqisfszi@gmail.com said:

I have recently started a website, the info you offer on this site has helped me tremendously. Thanks  for all of your time & work.

# November 29, 2012 1:25 PM

Jeter said:

I see you have been into weight lifting as well!

You should check out my blog, and other people articles!

# January 11, 2013 1:07 PM

eliarhtqda@gmail.com said:

Pretty section of content. I just stumbled upon your weblog and in accession capital to assert that I get in fact enjoyed account your blog posts. Any way I will be subscribing to your feeds and even I achievement you access consistently rapidly.

[url=http://www.wow-gold-team.com/]wow gold[/url]

# January 13, 2013 1:28 PM

RZLmtmxfNcxmkjpmQ said:

I really like and appreciate your article post.Really looking forward to read more. Much obliged.

# January 16, 2013 2:36 PM

Patino said:

Ahaa, its pleasant dialogue regarding this

article here at this website, I have read all

that, so now me also commenting here.

# January 16, 2013 9:29 PM

tizRmBWHhNcPsVqul said:

I really like and appreciate your blog article.Really looking forward to read more. Fantastic.

# January 16, 2013 9:52 PM

sixrtrnkcr said:

Oh so many Mascaras to choose from! ,<a href=wholesalemacmakeupx.wordpress.com Mac Makeup</a>

# February 13, 2013 12:57 PM

aoijrtnshu said:

I have been itching to get my hands on it for awhile now and ,<a href=cheapmacmakeups.blogspot.com mac</a>

# February 21, 2013 3:10 AM

Mcgraw said:

Your way of telling everything in this post is actually pleasant,

all be capable of effortlessly know it, Thanks a lot.

# March 14, 2013 3:39 AM

Smothers said:

My programmer is trying to persuade me to move to .

net from PHP. I have always disliked the idea because of the expenses.

But he's tryiong none the less. I've been using Movable-type on several websites for about a year and am nervous about

switching to another platform. I have heard very good things

about blogengine.net. Is there a way I can import all my wordpress content into it?

Any kind of help would be greatly appreciated!

# March 17, 2013 8:44 AM

Tolliver said:

What's up, after reading this amazing piece of writing i am too happy to share my know-how here with friends.

# March 24, 2013 4:05 PM

Social bookmarks said:

F9MaUO I loved your blog article.Thanks Again. Cool.

# April 19, 2013 7:21 PM

Hatch said:

"We don't have an extremely deep bench anyway," said Seton Hall coach Anne Donovan.

2 million - Melissa Carr blogs regarding the 2012's most absurd Vancouver properties on the thirties grind. Picture this: Katharine Hepburn and her chauffeur stopped for speeding inside the tiny capital of scotland- Blackwell, Okla.

# April 23, 2013 4:33 PM

Herrington said:

Manifestant des désirs est pour tout le monde ; mais il y a quelques droit des secrets attraction qui peuvent avoir échappé

à l'avis d'autres personnes. But Memphis went cold, not hitting

another shot through the floor after Douglas-Roberts jumper

with 10:40 left within the first half. Mainz defender Zdenek Pospech

shot inside the far post within the 63rd, only for

Bastos to perform likewise to equalize again with eight minutes

remaining.

# May 11, 2013 7:22 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)