New answers tagged

3

SPUser singleUser = new SPFieldUserValue(item.Web, item["Single User"] as string).User; SPUser[] multipleUsers = ((SPFieldUserValueCollection)item["MultipleUsers"]).Cast<SPFieldUserValue>().Select(f => f.User); I'm not sure why one user is stored as a string, but multiple users are stored as a specific object; it may also not be consistent in ...


0

I had a similar requirement to populate a date field with the last date of the current month. I ran into the same issue with respect to getting the date picker to accept the date value I was placing into the default value. I ended up using the following piece of code to create a date time string that would be accepted by the date control as a valid date ...



Top 50 recent answers are included