最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Common ASP.NET Code Techniques (DPC&DWCReference)-
时间:2022-06-30 11:55:18 编辑:袖梨 来源:一聚教程网
One of the things that I personally found frustrating with classic ASP was the difficulty associated with completing many common Web-related tasks. For example, the need to allow Web visitors to upload files to the Web server is fairly common for Web developers; however, with classic ASP the only way to accomplish this without much difficulty was through the use of a third-party COM component. Similarly, common tasks such as sending emails, reading and writing to the Windows Event Log, working with the Web server's file system, and dynamically generating images based on database information were all tricky, if not impossible, without the aid of a COM component.
Thankfully this has all changed with ASP.NET. Now Web developers can easily accomplish a plethora of common tasks without the need to create or buy a third-party component thanks in large part to ASP.NET being part of the robust .NET Framework. When you install the ASP.NET software on your computer from the CD accompanying this book, in addition to the ASP.NET engine, the entire .NET Framework will be installed. The .NET Framework consists of hundreds of classes broken down into a number of logical namespaces. These classes provide the methods and properties needed to create powerful Windows applications, from standalone desktop apps to Internet applications.
ASP.NET Web pages can utilize any of these hundreds of classes, giving ASP.NET Web pages the power and flexibility that classic ASP developers could only receive with the use of bulky COM components. In this chapter we will examine many of the new features that were difficult to implement with classic ASP but can be easily performed with an ASP.NET Web page.
1. Using Collections
Most modern programming languages provide support for some type of object that can hold a variable number of elements. These objects are referred to as collections, and they can have elements added and removed with ease without having to worry about proper memory allocation. If you've programmed with classic ASP before, you're probably familiar with the Scripting.Dictionary object, a collection object that references each element with a textual key. A collection that stores objects in this fashion is known as a hash table.
Thankfully this has all changed with ASP.NET. Now Web developers can easily accomplish a plethora of common tasks without the need to create or buy a third-party component thanks in large part to ASP.NET being part of the robust .NET Framework. When you install the ASP.NET software on your computer from the CD accompanying this book, in addition to the ASP.NET engine, the entire .NET Framework will be installed. The .NET Framework consists of hundreds of classes broken down into a number of logical namespaces. These classes provide the methods and properties needed to create powerful Windows applications, from standalone desktop apps to Internet applications.
ASP.NET Web pages can utilize any of these hundreds of classes, giving ASP.NET Web pages the power and flexibility that classic ASP developers could only receive with the use of bulky COM components. In this chapter we will examine many of the new features that were difficult to implement with classic ASP but can be easily performed with an ASP.NET Web page.
1. Using Collections
Most modern programming languages provide support for some type of object that can hold a variable number of elements. These objects are referred to as collections, and they can have elements added and removed with ease without having to worry about proper memory allocation. If you've programmed with classic ASP before, you're probably familiar with the Scripting.Dictionary object, a collection object that references each element with a textual key. A collection that stores objects in this fashion is known as a hash table.
相关文章
- 《彩色点点战争》推图常用三大主c玩法详解 01-23
- 《燕云十六声》池鱼林木任务攻略 01-23
- 《大连地铁e出行》查看行程记录方法 01-23
- 《明日方舟》2025春节限定干员余角色介绍 01-23
- 《崩坏:星穹铁道》万敌光锥搭配攻略 01-23
- 《燕云十六声》一药千金任务攻略 01-23