hi, i have a custom datatype which adds controls to a content page as follows:
DataTypeDefinition type = DataTypeDefinition.GetDataTypeDefinition(-88); //-88 is a TextBox definitionListItem.Controls.Add(type.DataType.DataEditor.Editor);
but now to i get the value entered into this text box on a button click event handler?
dynamic datatype controls
hi, i have a custom datatype which adds controls to a content page as follows:
DataTypeDefinition type = DataTypeDefinition.GetDataTypeDefinition(-88); //-88 is a TextBox
definitionListItem.Controls.Add(type.DataType.DataEditor.Editor);
but now to i get the value entered into this text box on a button click event handler?
andrew,
Take a look at the source code of membercontrols or doc2form see http://umbracoext.codeplex.com/SourceControl/changeset/view/52448 they will give you better idea of how to do this.
Regards
Ismail
thanks a lot!
i managed to work it out yesterday but that source code reaffirms my findings.
turns out you need to "Save" the DataEditor to populate the Data object of the DataType..
Umbraco can be a very obscure model!
is working on a reply...