Site Archives ASP.NET

How to use T4 to generate strongly-typed AzMan wrapper


This article provides a brief overview of AzMan and demonstrates how several existing APIs can be used to perform authorization checks in .NET applications. It then discusses shortcomings of the current APIs and demonstrates how T4 templates can be used to generate a set of C# classes and enumerations that wrap AzMan COM API and allow application developers to write strongly-typed authorization code.

How to use T4 to generate strongly-typed navigation class in ASP.NET


In this article, Kirill Chilingarashvili demonstrates how to use a T4 template to generate a navigation class in ASP.NET. This class contains nested classes that represent folders and string constants that represent user control (.ascx) files in the application. Using such navigation class helps to avoid hard-coding file paths as string literals and since it […]