Monday, September 19, 2011

Retreiving all list templates

protected void Page_Load(object sender, EventArgs e)
        {
            int i = 0;

            foreach (string enumName in Enum.GetNames(typeof(SPListTemplateType)))
            {
                i++;
                // lstTypes is a ListBox
                lstTypes.Items.Add(i.ToString() + ". " + enumName);
            }
        }

No comments:

Post a Comment