Chapter 15. Using the Framework Classes


15. Using the Framework Classes

Most of this book so far has concentrated, quite correctly, on the classes in the System.Web and associated namespaces of the .NET Framework. This is what you would expect, because it is here that the classes implementing ASP.NET reside. However, .NET provides a rich environment of managed code objects that you can use from code in your ASP.NET pages.

This makes many tasks much easier than in previous (and other) environments where you have to instantiate external components to be able to step outside the bounds of the intrinsic language capabilities. For example, in versions of ASP prior to ASP.NET, you often had to resort to registering COM objects of various kinds and then instantiating them within the process of your Web server.

Now, using the Framework classes, you benefit from the inherent flexibility, efficiency, and safety that managed code provides. There is no need to go across processing boundaries when calling other classes; and the features such as automatic garbage collection, integrated debugging capabilities, simple no-registration deployment, and compatible data and parameter types make using the Framework classes much easier.

In this chapter, you will see some of the ways you can use the classes in the namespaces outside of System.Web, including:

  • Storing data with the System.Collections classes

  • Reading, writing, and compressing data with the System.IO classes

  • Creating graphics and images with the System.Drawing classes

  • Accessing the Internet with the System.Net classes

  • Sending e-mail with the System.Net.Mail classes

  • Accessing Active Directory with the System.DirectoryServices classes

  • Encrypting data with the System.Security.Cryptography classes

The chapter starts with a look at the example application provided for this chapter, which illustrates techniques related to all of the topics just presented.



ASP. NET 2.0 Illustrated
ASP.NET 2.0 Illustrated
ISBN: 0321418344
EAN: 2147483647
Year: 2006
Pages: 147

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net