Tag Info

Hot answers tagged

2

Web.SiteUsers gives all users whether they are added in a group or added explicitly without being part of any group. using (var clientContext = new ClientContext("http://aissp2013:90")) { Web web = clientContext.Web; UserCollection coll = web.SiteUsers; clientContext.Load(coll); clientContext.ExecuteQuery(); foreach (User ...


1

using (SPSite site = new SPSite("http://pbmossdev")) { using (SPWeb web = site.OpenWeb()) { string listName = "New List"; string listDescription = "Test content types on lists"; Guid listId = web.Lists.Add(listName, listDescription, SPListTemplateType.GenericList); SPList myList = ...


1

Go to the List Settings page for your list, scroll down to the Content Types section, click on the link 'Change new button order and default content type', and on the following page uncheck 'Visible' for the Item content type. It will no longer be visible in the new item ribbon menu.


1

In user information list, the itemids are the user id's of the user. To get the user id use the below method SPUser user = SPContext.Current.Web.EnsureUser("LOGON NAME");` // The actual User Information is within this SPListItem by querying with ID got from previous step SPListItem userItem = userInformationList.Items.GetItemById(user.ID);


1

You could consider the following solution. Add client side validation to determine whether the user has already responded to survey. If validation will fail then display user friendly message otherwise display the original response form. It will allow to avoid this exception to occur. Solution Override JavaScript function for opening response form ...



Only top voted, non community-wiki answers of a minimum length are eligible