Common asp.net Code techniques (dpc&dwcreference)-
Source: Internet
Author: User
One of the things that I personally found frustrating with classic ASP is 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 was fairly common for web developers; However, with classic ASP the "way to accomplish" this without much difficulty is 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 "need to" create or buy a third-party compon ENT the robust. NET Framework of the large part to ASP.net being. When you install the "ASP.net software on your computer from the" CD accompanying this book, in addition to the ASP.net NE, the entire. NET Framework would 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 a PPS to Internet applications.
asp.net Web pages can utilize any of this hundreds of classes, giving ASP.net Web pages the power and flexibility that CL Assic ASP developers could only receive with the use of bulky COM components. In this chapter we'll examine many of the new features that were difficult to implement with classic ASP but can be easi Ly performed with a asp.net Web page.
1. Using Collections
Most Modern programming languages provide support for some type of object, 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 have to wor Ry about proper memory allocation. If you have ' ve programmed with classic ASP before, your ' re probably familiar with the Scripting.Dictionary object, a collection Object that references the each element with a textual key. A collection that stores objects into this fashion is known as a hash table.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service