We can create our own custom document library programmatically, here is the code shown below
SPSite site = SPContext.Current.Site as SPSite;
SPWeb web = site.RootWeb as SPWeb;
try
{ //Create a new library as the permanent library
Guid customListID = web.Lists.Add("CUSTOM DOCUMENT LIBRARY", "CUSTOM DOCUMENT LIBRARY", SPListTemplateType.DocumentLibrary);
web.Update();
}
7 comments:
How can i put this into a visual studio solution.
Yes you can put
Can you help to integrate document management system in asp.net and how to use singal sign off
Is it possible to create a document library within another document library? I would like to attached different automatic workflows to different document libraries within a main document library.
Is this possible thur GUI or programmatically?
Thanks,
John.
lif3 i am not sure about GUI but i think it must be possible through programming o think Rajkaml or any other expert can give a better outline of such a program.Have you written any code yourself
Hi Rajkamal
This was so useful...!!!
Thanks a lot and keep it up.
Hi,
I want to display this to Quick launch with the same name of Document Library,I am using below code..
docLib.OnQuickLaunch = true;
But it is not working can you please help me on that...
Thank you.
Post a Comment