150 likes | 293 Views
This training course teaches you how to create a user control for DotNetNuke, enabling effective interaction with databases. You will learn to create a stored procedure, develop a user interface in ASP.NET, and utilize databound controls like the DataGrid. The agenda covers building SQL interfaces, pagination strategies, and using templated columns. Ideal for developers aiming to enhance their DotNetNuke modules with robust user interfaces. By the end, you will have a solid understanding of integrating controls with the HEAT database and best practices for managing user data.
E N D
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? • Creating a Stored Procedure • How to build a User Control for DotNetNuke • Use of Databound Control – Datagrid • 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
Build Relevant SQL to Heat System • Identifiy fields we need
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 • Use default columns that are auto bound • Modify Datagrid properties to look nice. • 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