SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm working with WSS 3.0, building a customized SharePoint site using .NET 3.5 and SPVisualDev. I have edited the FeatureEventReceiver.cs in the List area to add a new column to the User Information List ("AvailableHours"). When I go into the site after building, I can see the new column in the User Information screen. However, when I try to access this column programatically, I am told the column doesn't exist.

I have used elevated privileges but this is having no effect. Does anybody have an idea about what I'm doing wrong?

share|improve this question
up vote 0 down vote accepted

Try installing the Codeplex project SharePoint Manager 2007, and browse for your new column via the object hierarchy.

You might need to access it via it's internal name.

share|improve this answer
Turns out what I thought had been set as the internal name for this column hadn't been set. Thanks for the link - I've been using the U2U CAML Query Builder but this is very handy! – grimorde Apr 19 '10 at 14:56

Choice fields are often used within SharePoint lists to display choice options like Gender, Status, etc and these choice options can be displayed using Radio Button and Dropdown formats.

Provided below is a code sample in C#.Net which describes the creation of a choice field programmatically using SharePoint API.

/* get the newly added choice field instance */ SPFieldChoice chFldGender = (SPFieldChoice)lst.Fields["Gender"];

hope it did answer the question.Any suggestions are appreciated.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.