Creating a Custom SharePoint Picture Library from Visual Studio?
-
04-10-2020 - |
Pregunta
Currently I have created a custom Picture User-control, and retrieving images from Picture Library,.
Now I'm trying to create Picture Library from Visual Studio, means Picture Library must be created from solution.
How can this be done?
Solución 2
After some R&D Found Artical SharePoint 2013 Custom Picture Library Creation & Deployment
All My requirments Covered in above artical
Otros consejos
You can create in two ways. One using list definition (xml) files or using Object Model.
Below is a snippet to create library using object model
SPWeb web = SPContext.Current.Web; //or create SPWeb object
web.Lists.Add("LibName", "Description", SPListTemplateType.PictureLibrary);
web.QuickLaunchEnabled = true; //false to not display in left nav
web.Update();
You can add this code inside a feature receiver.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a sharepoint.stackexchange