views:

157

answers:

1

Can anyone guide me for creating a Form library programmatically using C#.This is used for publishing infopath form. After creating the form library i need to add the fully trusted file(.xsn file) to the FORM’s FOLDER of that particular library.

+1  A: 

Found here:

SPWeb web = ...

SPListTemplateType templateType = SPListTemplateType.XMLForm;
Guid listId = web.Lists.Add("MyFormLibrary", null, templateType);
SPList documentLibrary= web.Lists[listId];

This article shows how to upload a file.

Timores