As a developer you are likely painfully aware that not all features of an application can be anticipated when the software ships. In order to cope with these eventualities and save yourself time (and perhaps money), it makes sense to write your applications in such a way that end users can be made as independent of the developers as possible. Giving your users the power to make changes to the way the application operates once it has shipped gives them more control over the way the application works, while reducing the frequency with which you need to redistribute application files, creating a win-win situation. __Pro Dynamic .NET 4.0 Applications__ explains how to give users the power to create additional data-entry fields, validation logic, and new reports without assistance from the application developer. You will learn how to do this for both desktop (C# and WPF) and web (ASP) applications. ## What you’ll learn ## Who this book is for This book is for anyone wanting to distribute an application in which the user needs to be as independent of the developer as possible. By using the techniques described in the book, the user will have the power to make modifications to his own applications, and the developer will reduce the frequency with which he needs to redistribute EXEs. ## Table of Contents Prelim......Page 1 Contents at a Glance......Page 6 Contents......Page 7 About the Author......Page 11 About the Technical Reviewer......Page 12 Acknowledgments......Page 13 Introduction......Page 14 Introducing Data-Driven Programming......Page 15 SQL Server......Page 16 Oracle......Page 18 Practical Applications......Page 20 Code Generation......Page 23 Custom Code Generators......Page 24 Namespaces, Classes, and Fields......Page 27 Support Methods......Page 31 Constants......Page 35 Enums......Page 36 Properties......Page 37 Methods......Page 38 Source Code......Page 41 Summary......Page 42 Instantiating Classes......Page 43 Loading Shared Assemblies......Page 45 Examining Classes......Page 46 Methods......Page 47 Fields......Page 49 Properties......Page 51 Interfaces......Page 52 Constructors......Page 53 Events......Page 54 Building an Object Hierarchy......Page 55 Importing Control Definitions......Page 59 Decompiling Source Code......Page 66 Summary......Page 71 System.CodeDom.Compiler Namespace......Page 73 Compiling the Code......Page 75 Error Handling......Page 77 Executing the Code......Page 80 Referencing Controls on Forms......Page 82 Adding References......Page 84 Summary......Page 89 Instantiating Forms......Page 91 Wiring Events......Page 95 Loading Control Definitions......Page 97 Loading from XML......Page 98 Loading from a Table......Page 100 Connecting Event Code......Page 104 Building a Filter Screen......Page 106 Saving the User Selections......Page 107 Restoring the User Selections......Page 111 Saving Grid Settings......Page 113 Data-Driven Menus......Page 117 Application Menus......Page 118 Most Recently Used File Menu......Page 122 Dynamic Criteria Controls......Page 124 Extracting the User Selections......Page 131 Summary......Page 136 Instantiating Web Controls......Page 137 Understanding the Page Life Cycle......Page 141 Using HTML Tables......Page 147 ParseControl......Page 151 Instantiating User Controls......Page 153 Repeater Controls......Page 157 Dynamic Criteria Controls......Page 161 Extracting the User Selections......Page 166 Summary......Page 167 XAML......Page 169 Layout......Page 171 Canvas......Page 172 Grid......Page 174 StackPanel......Page 176 WrapPanel......Page 178 DockPanel......Page 180 Runtime Instantiation......Page 182 Accessing Child Controls......Page 185 Nested Controls......Page 186 XamlWriter/XamlReader......Page 189 Persisting Objects......Page 190 IsAncestorOf/IsDescendantOf......Page 191 Wiring Events......Page 193 Data-Driven .Menus......Page 194 Summary......Page 196 SQL Server Extended Properties......Page 197 Microsoft Excel......Page 203 Syncfusion’s Essential XlsIO......Page 205 SoftArtisans’ OfficeWriter for Excel......Page 208 iTextSharp......Page 211 Syncfusion’s Essential PDF......Page 214 Preset Columns......Page 216 Using the Crystal SDK......Page 219 Using RDL......Page 224 Dynamic Rdl......Page 226 Summary......Page 230 Data Storage......Page 231 Committing Data to the Database......Page 235 Structuring Inverted Data......Page 239 Extracting Inverted Data......Page 241 Converting Inverted Data to a Normalized Structure......Page 243 Mixing Normalized and Inverted Tables......Page 246 Summary......Page 249 Index......Page 251 As a developer you are likely painfully aware that not all features of an application can be anticipated when the software ships. In order to cope with these eventualities and save yourself time (and perhaps money), it makes sense to write your applications in such a way that end users can be made as independent of the developers as possible. Giving your users the power to make changes to the way the application operates once it has shipped gives them more control over the way the application works, while reducing the frequency with which you need to redistribute application files, creating a win-win situation. This book explains how to give users the power to create additional data-entry fields, validation logic, and new reports without assistance from the application developer. You will learn how to do this for both desktop (C# and WPF) and web (ASP) applications Provides information on building .NET 4.0 applications, covering such topics as database metadata, assembly objects, WinForms, WPF, ASP.NET, reporting, and database design.