0

Modules to Include Files In Sharepoint (Basics)

Hi,

I am going To Explain you Basic Concept of module in share point this is just basic Example How Module is Work actually in sharepoint

Not Confused with Visual Code Module ,Basic use of module Just place File in your Sharepoint Server at specific Locations by Deploying your Solutions

ok Let`s Start the stuff Just Follow Below steps

1.Open Visual Studio and Create New Empty Solution Name (Module Test)

2.Now Open Your Solution Explorer and Right Click on IT

3 Go To add New Item add Module(Name -Module1)

4 Now you can Notice module is Add in your Solution Which Contain two Default File(Element.xml,Sample.txt)

5.Open your Element.xml you can notice Default code Like Below

<Elements xmlns=”http://schemas.microsoft.com/sharepoint/”&gt;

<Module Name=”Module1″>

<File Path=”Module1\Sample.txt” Url=”Module1/Sample.txt” />

</Module>

</Elements>

6. Do not change any thing just Deploy solutions and check you sharepoint site Sample.txt File on placed at Module/Sample.txt

File Element has Following Attributes

Attribute Name Description
Path The name and location of the file in the SharePoint solution. The format is,Path=”Module1\Sample.txt”.
Url The location where the file will be deployed on the SharePoint server. The format is,Url=”Module1/Sample.txt”.
Type An optional attribute that has two settings: GhostableInLibrary and Ghostable. The format is,Type=”GhostableInLibrary”. Specifying GhostableInLibrary means the file will be added to a document library in SharePoint together with a list item to accompany the file when it is added to the library. Specifying Ghostable causes the file to be added to SharePoint outside the document library

This is just basic example for your Understanding  I will write more example of Module.Soon

Enjoy..!!!

Thanks

SPS

Advertisements