Chapter 14: ASP.NET Pages

 
Chapter 14 - ASP.NET Pages
bySimon Robinsonet al.
Wrox Press 2002
  

Overview

If you are new to the world of C# and .NET in general you may wonder why a chapter on ASP.NET has been included in this book. It's a whole new language, right? Well, not really. In fact, as we will see, it is possible to use C# to create ASP.NET pages. But we're getting ahead of ourselves here - first off we should discuss exactly what ASP.NET is.

ASP.NET, or Active Server Pages .NET, ships as part of the .NET Framework and is a technology that allows for the dynamic creation of documents on a web server when they are requested via HTTP. This mostly means HTML documents, although it is equally possible to create, say, WML documents for consumption on WAP browsers, or indeed anything else with a MIME type.

In some ways ASP.NET is similar to many other technologies, such as PHP, ASP, ColdFusion, and so on - but there is one important difference. ASP.NET, as its name suggests, has been designed to be fully integrated with the .NET Framework, part of which includes support for C#.

It is quite possible that you have had experience of the last Microsoft technology for achieving dynamic content generation - ASP. If this is the case then you will probably know that programming in this technology used scripting languages such as VBScript or JScript. This worked, but it did mean that some things were awkward for those of us used to 'proper', compiled programming languages, and it certainly resulted in a loss of performance.

One major difference, related to the use of more advanced programming languages, is the provision of a complete server-side object model for use at runtime. ASP.NET gives access to all of the controls on a page as objects, in a rich environment. On the server side we also have access to any other .NET classes we may require, allowing for the integration of many useful services. Controls used on a page expose a lot of functionality; in fact we can do almost as much as with Windows Forms classes, which gives plenty of flexibility. For this reason, ASP.NET pages generating HTML content are often called Web Forms .

In this chapter we will take a more detailed look at ASP.NET, including how it works, what we can do with it, and where C# fits in.

  


Professional C#. 2nd Edition
Performance Consulting: A Practical Guide for HR and Learning Professionals
ISBN: 1576754359
EAN: 2147483647
Year: 2002
Pages: 244

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