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.

Examples with Data of the current App

  1. Data from the App using App.Data
  2. Data from the App using App.Query
  3. CSV data from an App.Query

Examples with Data from CSV or SQL

  1. SQL data from an App.Query
  2. SQL data from a SQL query and DataTable
  3. SQL data from a SQL query and DataReader

Examples with Data from DNN/DotNetNuke

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

Parent/Child a.k.a. List/Details Examples (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)