Training Learning to Build a User Control for use in DotNetNuke Module Robin Lilly
Introduction To build a UserControl that is usuable from DotNetNuke What will I learn? 1. Creating a Stored Procedure 2. How to build a User Control for DotNetNuke 3. Use of Databound Control – Datagrid 4. Database Interface to Stored Procedure
Final Objective Build this User Interface to HEAT database in ASP.NET
Agenda Build the Relevant SQL that will be executed. Create interface to this SQL –A class with a method to allow separation of Database interface from the other Layers (n- tier) Build page that has a Datagrid Create User Control From that Page
Understanding Heat Database
Build Relevant SQL to Heat System Identifiy fields we need
DEMO SQL BUILD
Create interface to SQL
Create interface to this SQL Create New Project Add a Simple User Control Add Control into DotNetNuke Create Interface Class
Demo Build Hello World Control Create Hello World Control Insert Sql Module into DotNetNuke Framework
Demo HEAT control datagrid Change HelloWorld to hook Database in. Add Datagrid 1.Use default columns that are auto bound 2.Modify Datagrid properties to look nice. 3.Add Paging in.
Demo 2 HEAT control datagrid Remove AutoColumns Add BoundColumns Add Templated Column Add Show Closed Change procedure to allow show closed method
Important Notes When doing Paging with larger result sets. You would have the database handle the paging verses the control. Many other controls Templated columns are used quite frequently To build more complicated things you must define a function to call from a column. In DotNetNuke the call is easier than shown.
Things You Learned Created a Stored Procedure Built a User Control for DotNetNuke Learned use of Databound Control Learned to build an interface to a stored procedure Learned simple paging
Where to Get More Information GotDotNet.com – help files ASP.Net MSDN.Microsoft.com ASPAlliance.com Search Google.com