Follow

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">
                  <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>

  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

Comments