Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 28th, 2008, 10:59 AM
Registered User
 
Join Date: Jul 2008
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Web Custom Events

public WebCustomEvent(string message, object eventSource, int eventCode)
         : base(message, eventSource, eventCode) { }

I am new to this kind of code seems like the constructor of the child class and base class has something going on . Could someone tell me what is going on in the code.
Thanks


 
Old July 28th, 2008, 03:07 PM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

public abstract class WebCustomEvent : WebBaseEvent
   {
      public WebCustomEvent(string message, object eventSource, int eventCode)
         : base(message, eventSource, eventCode) { }
   }

This is an abstract class that defines a base for custom events that can be implemented in the application.

You'll notice that there is a class called RecordDeletedEvent that implements this abstract class.

In each of the the Delete methods in the code, there is a line that raises this event. Then, the health monitoring system logs the RecordDeletedEvent in the database, so that you can look up who deleted what record, and when they deleted it.

By implementing WebCustomEvent in other classes, you could log any application event you care to track.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Service, Custom Control, Custom Return Type robzyc ASP.NET 2.0 Basics 6 June 10th, 2008 08:03 AM
Custom Events Chapter3 rav BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 September 5th, 2007 07:43 PM
Events for custom control in datarepeater?? lauriedthompson VB How-To 0 June 20th, 2007 05:11 AM
Web Custom Control Events junshi ASP.NET 1.0 and 1.1 Professional 1 May 3rd, 2007 01:19 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.