150 likes | 286 Views
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
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