Databinding Webnodes objects

Created by Vidar Langberget

All data that you access with the Webnodes API is strongly typed. This means it is very suitable for databinding situations.

Different methods to do databinding

  • Manually attach datasource

    Manually attaching objects in a collection to a datasource is the simplest method for doing databinding. For more advanced situations, the complexity of handling when to do databind is a common problem for inexperienced ASP.NET developers.
  • Use an ObjectDataSource Control

    The ObjectDataSource is a control that lets you specify which class to use for fetching the data. Instead of connecting to the Webnodes API directly in the ASP.NET file, the data access code is all handled in a separate class. Very flexible, but a bit more work to get up and running. One of the big advantages is that you don't need to specify when to do the databinding, so you circumvent a lot of the complexity in manual databinding.
  • Use a LINQDataSource control

    The LinqDataSource is a control that let's you specify a series of Linq queries that handle the different operations, like SELECT, EDIT, UPDATE and DELETE.