Thursday, February 7, 2013

Get template name of SPWeb

You may need to get the template type from which the SPWeb has been created. You must be thinking that to get this is really easy, there must be a property which gets us this value.

Well, it is really but there is no direct property. There is one property of SPWeb called WebTemplate. Let's try that.

and the result is

Now change it to this

1033 is for English. You may need to change it depending on the English.

and here we go

I hope this helps

No comments:

Share your SharePoint Experiences with us...
As good as the SharePointKings is, we want to make it even better. One of our most valuable sources of input for our Blog Posts comes from ever enthusiastic Visitors/Readers. We welcome every Visitor/Reader to contribute their experiences with SharePoint. It may be in the form of a code stub, snippet, any tips and trick or any crazy thing you have tried with SharePoint.
Send your Articles to with your Profile Summary. We will Post them. The idea is to act as a bridge between you Readers!!!

If anyone would like to have their advertisement posted on this blog, please send us the requirement details to