Wednesday, November 25, 2009

Mastering Visual C# .NET


This book shows you how to use C# and the ASP.NET framework in a specific way— by using code-
behind classes to build Web applications. In classic ASP, you could mix executable code and HTML in
the same file. You can still do that in ASP.NET, but the technology described in this book is more like
VB6 WebClasses, which used HTML templates in conjunction with a compiled VB-generated DLL. The
DLL code could access the HTML templates to "fill" them with data, thus creating a very clean
separation between the user interface (the HTML) and the code.

Code-behind classes in C# follow that same logic but are considerably easier to use. At the simplest
level, you create an HTML template, called a Web Form, that contains the user interface elements. From the Web Form, you reference the code in a class in the code-behind file; finally, you program the contents of the HTML elements from the C# class. Like WebClasses, separating the code that activates the HTML templates from the templates themselves gives you a much cleaner separation. For example, it's very easy, after you have a defined set of user-interface elements, to let HTML designers build an interface and modify that interface by adding static elements or changing the positions and/or the look-and-feel of those elements without interfering with the way the page works. Similarly, you can reuse the user-interface templates, filling them with different data or copying them from one application to the next without having to rebuild the interface.


For these reasons, C# Web applications using the ASP.NET framework and code-behind classes are
the base technology used in this book. I've devoted roughly half the book to explaining how to use and
explore Web Forms, but as I've already mentioned, there are several ancillary technologies that you
either must know, such as HTML and CSS, to build Web applications, or should know, or at least be
aware of, such as database access with ADO.NET, Web services, caching data, writing components
and services, XML, and transforming XML documents with XSLT. Learn More Mastering ASP.Net with Visual C#

0 comments: