Posts

Q. What does AllowUnsafeUpdates do ? Ans. If your code modifies Windows SharePoint Services data in some way, you may need to allow unsafe updates on the Web site, without requiring a security validation. You can do by setting the AllowUnsafeUpdates property. C#: ? 1 2 3 4 5 6 7 8 9 10 using(SPSite mySite = new SPSite("yourserver")) { using(SPWeb myWeb = mySite.OpenWeb()) { myWeb.AllowUnsafeUpdates = true; SPList interviewList = myWeb.Lists["listtoinsert"]; SPListItem newItem = interviewList.Items.Add(); newItem["interview"] = "interview"; newItem.Update(); } } Q What does RunWithElevatedPrivileges do? Ans. Assume that you have a Web Part in which you want to display information obtained through the Windows SharePoint Services object model, such as the name of the current site collection owner, usa

Find missing number in sequence

To find missing number in sequence, Use below given code :             var list = new List<int>(new[] { 1, 2, 4, 7, 9 });             var result = Enumerable.Range(1, 10).Except(list);             foreach (int i in result)             {                 Console.WriteLine(i.ToString());             }             Console.Read(); When you run above given code you will get missing numbers : 3 5 6 8 10

SharePoint 2013 : Drag & Drop feature not working

Hi , I was working with SharePoint 2013 on IE 9 & I saw that Drag & Drop feature was not working on my IE. I checked it again on my other PC which got IE 10 & Office 2013 installed. It was working there. Then I upgraded my IE9 to IE10 now it is working good. It means you must have IE 10 to run all new features of SharePoint 2013.