Quantcast
Channel: Developing Apps for SharePoint 2013 forum
Viewing all articles
Browse latest Browse all 8089

List Creation Through Feature

$
0
0

Hi,

I want to create a list through Featute.When that Featute will get activated ,List should be created. I am able to create list when I am hard coding the site URL.But Whenever I am writing site url as

public override void FeatureActivated(SPFeatureReceiverProperties properties)
        {
            try
            {
                SPSecurity.RunWithElevatedPrivileges(delegate()
                {
                    using (SPSite site = new SPSite(((SPWeb)properties.Feature.Parent).Url))                {
Its not getting created. Please help me.

Shubho


Viewing all articles
Browse latest Browse all 8089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>