Difference between a Site Page and an Application Page Here we will check what is the difference between a site page and an application page in Sharepoint. There are two types of pages in SharePoint. 1. Site Pages 2. Application Pages Common on them: They both inherit their layout from the same master page. 1. Site Pages: A site page contains text, images, web parts etc and Site pages are stored in the file system. But a end user can create, edit or customized a site page using sharepoint designer or browser. But once an end user modified the site page using SharePoint designer, the template for this page is stored in the content database rather in file system. So every time a user requested the page, the page is retrieved from the content database. At the same time you can also reset to the original template using designer. A site page can contain inline server code, but once it becomes customized it can not contain. A site page can also host features such as dynamic Web ...
Method 1 - Here is a simple code for uploading a file without metadata public Boolean UploadDocument(string fileName, string filePath) { ClientContext ctx = new ClientContext(“http://yoursharepointURL”); Web currentWeb = ctx.Web; ctx.Load(currentWeb); ctx.ExecuteQuery(); using (FileStream fs = new FileStream(filePath, FileMode.Open)) { Microsoft.SharePoint.Client.File.SaveBinaryDirect(ctx, “/Shared Documents/”+ fileName, fs, true); } Console.WriteLine(“Uploaded File Successfully”); } The above method accepts two parameters one is fileName - name of the file and filePath - the path of the file on your computer or in sharepoint. for e.g. “C:\TestFile.doc”. With this method however, you will not be able to set the metadata for the document ( i couldn’t do it! ) so i used the other method for adding a document and its metadata. Method 2 – The below method will upload a file in sharePoint 2010 document library with the metadata ...
Comments
Post a Comment