I have like tens of custom Site definitions, so when I try to create a new site collection I select a template name, let say "ABCD 2020 DEVELOPMENT ISSUE SOLVED" and create a new site based on this template.
when I try to get Template name of same site I just created I get something like this "STSabcsdsjhsd" , i tried following code to get it.
public void GetSiteTemplate(string siteUrl)
{
using (SPSite site = new SPSite(siteUrl))
using (SPWeb web = site.OpenWeb())
{
textBox3.Text = web.WebTemplate.ToString(); // output = "STSxcvmcxv2020"
textBox4.Text = web.WebTemplateId.ToString(); // output = "100016"
textBox2.Text = web.Configuration.ToString(); // output = "3"
}
}
Now I can't figure out how can I find out the Template Name that I used to create this site at first place, Programmatically
Edit
How can I find Title of a Configuration using its Configuration saved in WEBTEMP*.xml file unless there is a better way to get it*
