This is the control that binds the BusinessObject to the User interface in the admin.
The Control will inherit from ToolControl<T>
- Create new User control
- ie (NewsArticle.ascx)
- Add all of the front end elements you will need for binding
-
<fieldset>
<legend>Article Information</legend>
<div class="form-row">
<label>Headline</label>
<telerik:RadTextBox runat="server" ID="txtHeadline"></telerik:RadTextBox>
</div>
<div class="form-row">
<label>Date</label>
<telerik:RadDatePicker ID="dtDate" runat="server"></telerik:RadDatePicker>
</div>
<div class="form-row">
<label>Summary</label>
<telerik:RadTextBox runat="server" ID="txtSummary" TextMode="MultiLine" Rows="4"></telerik:RadTextBox>
</div>
</fieldset>
<fieldset>
<legend>Page Url</legend>
<div class="form-row">
<label>SEO Name</label>
<telerik:RadTextBox runat="server" ID="txtSEO"></telerik:RadTextBox>
</div>
</fieldset>
-
- Goto CodeBehind and Inherit from ToolControl<T>
- public partial class ClientAdmin_Website_Tools_NewsArticle : ToolControl<BusinessEntity.NewsArticle>
- Override the Methods
- protected override void LoadDataFromObject(ActionArgs e) -> Bind data to the front end expression
- protected override void SaveDataToObject() -> save data from front end expression to object
Comments