Create a Tool Control

API Reference

This is the control that binds the BusinessObject to the User interface in the admin.

The Control will inherit from ToolControl<T>

  1. Create new User control
    1. ie (NewsArticle.ascx)
  2. Add all of the front end elements you will need for binding
    1.     <fieldset>
              <legend>Article Information</legend>

              <div class="form-row">
                  <telerik:RadTextBox runat="server" ID="txtHeadline"></telerik:RadTextBox>

              <div class="form-row">
                  <telerik:RadDatePicker ID="dtDate" runat="server"></telerik:RadDatePicker>
              <div class="form-row">
                  <telerik:RadTextBox runat="server" ID="txtSummary" TextMode="MultiLine" Rows="4"></telerik:RadTextBox>
              <legend>Page Url</legend>

              <div class="form-row">
                  <label>SEO Name</label>
                  <telerik:RadTextBox runat="server" ID="txtSEO"></telerik:RadTextBox>

  3. Goto CodeBehind and Inherit from ToolControl<T>
    1. public partial class ClientAdmin_Website_Tools_NewsArticle : ToolControl<BusinessEntity.NewsArticle>
  4. Override the Methods
    1.  protected override void LoadDataFromObject(ActionArgs e) -> Bind data to the front end expression
    2. protected override void SaveDataToObject() -> save data from front end expression to object
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request