Skip to main content


Showing posts from September, 2019

How to check whether list item contains attachment or not using code.

To check whether the list item contains the attachment programmatically or using CSOM. Get the list item collection and then check for the attachment column. List listEvent  = web.Lists.GetByTitle(listName); clientContext.Load(listEvent, L => L.Id); CamlQuery camlQuery2 = new CamlQuery(); camlQuery2.ViewXml = "<View><Query></View></Query>"; ListItemCollection item_Coll = listEventSource.GetItems(camlQuery2); clientContext.Load(item_Coll); clientContext.ExecuteQuery(); foreach (ListItem oLstItem in item_Coll)   {   bool attachmentPresent = Convert.ToBoolean(oLstItem["Attachments"]);   if (attachmentPresent)     {             Console.WriteLine("Item is present");     }    } Happy Coding !!!!!

How to hide the left navigation in team sites

In the modern team site in SharePoint navigation section is come by default, If you want to hide the left navigation in the modern team site. To hide the section, follow the steps . 1 .  Navigate to the team site, and click on the gear icon . 2 . After clicking on the gear icon, click on the site information. 3 .  On clicking the site information, "edit site information" box appears. Scroll down and click on the View all site settings. 4 .  On clicking the view all site settings, site settings appear, click on the Navigation Elements. 5 .  On clicking Navigation Elements, uncheck the options. 6 . Uncheck the options and click on OK. 7 .  Now the Left navigation is disappeared from your site. Enjoy... SharePoint.