Paul
-
2/3/2009 5:13:09 AM
CMSContext.CurrentDocument.DocumentContent.EditableWebParts.Add Method
This is my sample code:
Dim webpart_id As String = CType(PartInstance.GetValue("WebPartControlID"), String).ToString If Not CMSContext.CurrentDocument.DocumentContent.EditableWebParts.ContainsKey(webpart_id) Then CMSContext.CurrentDocument.DocumentContent.EditableWebParts.Add("new_webpart_id_key", "new_webpart_value") End If
It does not seem to add (as in insert) a new key/value item to the DocumentContent database column. Instead it replaces the only existing key/value pair.
What is the best way to insert a new key/value pair to the DocumentContent database field?
|