Home Home | Reset Page Reset Page | Page created: 5/21/2012 7:25:15 PM
This page demonstrates simple control binding using a business object to a Linq To Sql Entity in a standard Postback interface. Fields are bound to product entity which are bound on first load or product change. Data is then automatically unbound into the entity when the Save button is clicked. Although binding here binds against a single entity you can bind multiple entities or data sources with a single DataBinder.
Select a Product: New
Product Information
Pk:
Product Name:
Category:
Supplier:
Unit Information
Unit Price:   Units in Stock:
Reorder Level: Units on Order: Expected on:
Binding to arbitrary Page Objects
StringVar:
DecimalVar:
DateVar:
Null DateVar:
BoolVar:
Title of this Page:

Things to try on this page:

  • Leave the product name blank
    you should see a business object rule validation binding error
  • Put in invalid numeric or date data
    you should see binding errors in the appropriate controls.
  • Set the Page Title field
    This field is bound to this.Title (Page.Title) and should affect the HTML document title of the page via binding.
  • Check the Show these Value in Save message
    Then change some of the fields that are bound to an arbitrary standalone object. You should see the values echo'd back after a successful save operation. Note that you can bind controls to any object including to Page properties.