I am trying to simply add plain text or a hyperlink to a list item in sharepoint 2007.
I can add the field without problems:
list.Fields.Add("MyField",SPFieldType.Text, false);
And it shows up on my lists. However, no matter how I try, I cannot programmatically set the value for the field. I tried:
list.items[0]["MyField"] = "text";
and I tried loading in the field:
SPField field = list.items[0].Fields["MyField"];
and setting it there, and setting the default and updating, but nothing like that happens.
I always end my code blocks with list.update (); or if I myself work on the item.update () element; so I at least miss this one. Can someone tell me what I am doing wrong?
thanks
c # sharepoint sharepoint-2007
Dynde
source share