Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I downloaded a plugin for an Office product that prompts you for your SharePoint site url and username and password and then it will create you appropriate lists and views on your SharePoint site. Can someone let me know if I can make a program on my Windows XP machine that will take in the site url, username and password and be able to programmatically create lists and views?

I did some searching on google and it seems this needs to be done on the SharePoint server. I don't have access to the server and would need to do the development from my XP machine. And seeing the plugin do exactly what I wanted gives me some hope.

Thanks.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

You'll want to look at accessing SharePoint through its Web Services. Specifically, the Lists Web Service and the Views Web Service. Here's the Lists.AddList method from the lists service - should get you going down the right path.

share|improve this answer
    
Thanks Vinny, exactly what I was looking for. –  Sean Jun 2 '09 at 15:16

In this article I’m going to discuss how we can create a SharePoint list programmatically in c# and how we can add columns to the created list. Actually this is very simple task; this is a sample code. public void createList() { // choose your site SPSite site = new SPSite("

        // create new Generic list called "My List"
        lists.Add("My List", "My list Description", SPListTemplateType.GenericList);

        SPList list = web.Lists["My List"];

        // create Text type new column called "My Column" 
        list.Fields.Add("My Column", SPFieldType.Text, true);

        // make new column visible in default view
        SPView view = list.DefaultView;
        view.ViewFields.Add("My Column");
        view.Update();
    }
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.