Đang chuẩn bị liên kết để tải về tài liệu:
Professional ASP.NET 1.0 Special Edition- P22

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Professional ASP.NET 1.0 Special Edition- P22:Those of us who are Microsoft developers can't help but notice that .NET has received a fair amount of visibility over the last year or so. This is quite surprising considering that for most of this period, .NET has been in its early infancy and beta versions. I can't remember any unreleased product that has caused this much interest among developers. And that's really an important point, because ignoring all the hype and press, .NET really is a product for developers, providing a great foundation for building all types of applications | Log.Source LogName Log.WriteEntry Message EventLogEntryType.Error End Sub script In the above example we first Import the namespace System.Diagnostics since we will be using some of the classes found in this namespace to write to the event log. We then implement our Application_Error event handler and create some local variables before using the EventLog class s static method SourceExists to determine if the event log we re going to write to already exists - if it doesn t we create it. Finally we create a new EventLog instance named Log and use the WriteEntry method to enter our Message into the Windows Event Log. Whenever an error occurs within our application that error is now logged into a custom event log named Web_Errors. It should be noted here that we wrote little more than 10 lines of code to accomplish a task that could potentially be 50 to 60 lines in VB ASP. Now that we have covered each of the application events let s look at some advanced topics. These are areas that are left to the more advanced ASP.NET developer and the understanding of these topics is not required to build great ASP.NET applications but they do help Advanced Topics In this Advanced Topics section we will cover four advanced topics related to building superior ASP.NET applications Using static variables - It is not necessary in all cases to use Application to store persistent values in memory. Since ASP.NET is compiled and the application is represented in an object-oriented manner we can use global static variables in addition to Application. Using our own base class for global.asax - The earlier discussion of the Application directive for global.asax mentioned the Inherits attribute. We will examine how we can use this to create our own class for global.asax to instantiate. Mapping file extensions - If we want ASP.NET to support file extensions other than the defaults such as the file extension .wrox we must map the extension in IIS first. This is because IIS gets the first look at

TÀI LIỆU LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.