Professional ASP.NET 3.5 in C# and Visual Basic Part 151

Professional in C# and Visual Basic Part 151. Building on the revolutionary release, adds several key new developer features including AJAX, LINQ, and a new CSS designer in Visual Web Developer 2008. The dramatic reduction in code that developers realized from the more than 50 new server controls in now allows developers the time to make their applications more interactive with AJAX, to work with data in their preferred language with LINQ, and to build visually attractive and consistent standards-based sites with CSS | Chapter 32 Instrumentation Event Log Description Application Enables you to record application-specific events including whether a certain event was fired a page was loaded or a customer made a specific purchase Security Enables you to track security-related issues such as security changes and breaches System Enables you to track system-specific items such as issues that arise with components or drivers From your code you can write to any of the event logs defined in the preceding table as well as to any custom event logs that you might create. To accomplish this task create an example page that contains a multiline TextBox control and a Button control. On the Button1_ciick event you register the text you want placed in the text box directly into the Application event log. Your page should be similar to what is presented in Listing 32-2. Listing 32-2 Writing to the Application event log VB @ Page Language VB @ Import Namespace script runat server Protected Sub Page_Load ByVal sender As Object _ ByVai e As If Not My Application Then My Application Application End If End Sub Protected Sub Button1_Click ByVal sender As Object _ ByVal e As Dim el As EventLog New EventLog My Application ENTERED End Sub script html xmlns http 1999 xhtml head runat server title Working with Event Logs title head body form id form1 runat server div asp TextBox ID TextBox1 runat server Height 75px Continued 1465 Chapter 32 Instrumentation TextMode MultiLine Width 250px asp TextBox br br asp Button ID Button1 runat server OnClick Button1_Click Text Submit to custom event log br br asp Label ID Label1 runat server asp Label nbsp div form body html C @ Page Language C @ Import Namespace script runat server protected void Page_Load object sender EventArgs e if My .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
45    82    1    16-05-2024
Đã 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.