Posts

Showing posts from 2017

Creating Edit and View Buttons in SharePoint 2013 List View using JS Links

Image
JS Links Intro in SharePoint 2013 Client-side rendering is a new concept in SharePoint 2013. It’s provides you with a mechanism that allow you to use your own output render for a set of controls that are hosted in a SharePoint page ( list views, display, add and Edit forms ). This mechanism enables you to use well-known technologies, such as HTML and JavaScript, to define the rendering logic of custom and predefined field types. JSLink files have the ability to quickly and easily change how a list views and forms are rendered. More specifically how the fields in that list should be displayed. Note:  I wrote those code samples to be easy to understand and to achieve learning purposes, because of that I avoided using complex code and controls. In the same time I tried to present real world examples as much as possible. Creating Edit and View Buttons in SharePoint 2013 List View First we want to create a list. For eg: I am creating the Employee as a custom List. Fist we want t

Reading XML tag Values using Programmatically

Get the XML tag values  1. Create Constants.xml file and create the tags in the below format. <?xml version="1.0" encoding="utf-8" ?> <ConstantsXML>   //This is used as identifier to read the data from inside of the identified tag from Code <Constants> <EmpName> Employee Name </EmpName> <EmployeeID> Employee Id </EmployeeID> <EmpDepartment> Department </EmpDepartment> </Constants> </ConstantsXML> 2. Declaring the Variables   #region Members         static String elementValue;         private static readonly String ConstantNodeIdentifier = "ConstantsXML";         private static XDocument m_sourceDocument;   #endregion 3. Method to Read the XML Document form the Specified Path static Constant()         {             try             {                 if (System.IO.File.Exists(HostingEnvironment.MapPath("~/Common/Configuration.xml")))