Skip to main content

Data Tutorials

Tutorial HomeData

Working with Data

If you want to work with data (like from a database) instead of content (which are data items assigned to one instance) you need to get it from somewhere and then loop through it. Typical data comes from:

  • the current App, using App.Data[...]
  • a query in the App, using App.Query[...]
  • a SQL database - either through an App.Query, from a DataSource or from a SqlReader
  • a CSV file - either through an App.Query, from a DataSource or from your own code
  • DNN objects like the users - either through an App.Query, from a DataSource, from DNN-objects or from your own code
  • a JSON or XML file - usually loaded from your own code
  • a WebService - usually loaded from your own code

Once you have the data, you will usually want to loop-and-show, which is easiest using dynamic objects, so you can just type things like @Content.FirstName to show the properties.

Data of the current App.Data

  1. Data from the App using App.Data

Data from App.Query

  1. Using App.Query
  2. CSV data from an App.Query
  3. SQL data from an App.Query
  4. SQL data from an App.Query with Params new!
  5. App.Query with Params - Run multiple times new!

Data from direct SQL

  1. SQL data from a SQL query and DataTable
  2. SQL data from a SQL query and DataReader

Data from DNN/DotNetNuke

  1. DNN data (pages/tabs) from the DNN TabController

Parent/Child a.k.a. List/Details (new!)

  1. List-Details with one template and code-only (new!)
  2. List-Details with three templates and code-only (new!)
  3. List-Details with two templates, automatic view-switching (new!)
  4. List-Details with two templates, automatic view-switching and query (new!)

Future Examples (pending)