AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

ToolControlBase..::..SaveDataToObject Method

Override to read form field values and write them into the business object properties.

Namespace:  AdvantageCMS.Core.Admin.BaseClasses
Assembly:  AdvantageCMS.Core (in AdvantageCMS.Core.dll)

Syntax


protected void SaveDataToObject()

Examples


Read each form control value and assign it to the corresponding property on MyObject. Use RadDropDownList.SelectedValue and null-safe patterns for optional fields.
C#
protected override void SaveDataToObject()
{
    MyObject.Name = txtName.Text;
    MyObject.Description = txtDescription.Text;
    MyObject.Price = (decimal)(txtPrice.Value ?? 0);
    MyObject.IsActive = chkIsActive.Checked;
    MyObject.CategoryId = ddlCategory.SelectedValue;
}