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 October 2nd, 2006, 05:10 AM
Registered User
 
Join Date: Oct 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default RecordDeletedEvent and Event code

hi guys been looking at this fantastic book but i am having trouble with a couple of small bits. i was wondering if anyone could help me?

Firstly there is some code in the book on page 109 there is a some code for RecordDeletedEvent i cannot find this anywhere in the code files supplied? i am wanting to take this and recompile it in my own app but i dont want to use a dll yet i am just testing my code. So i was wondering where i would place that code???

Also when using the following code <add name="TBH Events" eventName="TBH Events" provider="..." profile="Critical" /> i was wondering what does this actually do? does it use the compiled code in the dll? why is it there? can you just simply change the name? and events name?

Cheers and thanks in advance

Tuppers

 
Old October 2nd, 2006, 04:14 PM
Registered User
 
Join Date: Oct 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi guys figured out the first problem i created a new customevents.vb file with the following in:

Imports System.Web
Imports System.Web.Management

Namespace MB.TheBeerHouse
    Public MustInherit Class WebCustomEvent
        Inherits WebBaseEvent

        Public Sub New(ByVal message As String, ByVal eventSource As Object, ByVal eventCode As Integer)
            MyBase.New(message, eventSource, eventCode)
        End Sub
    End Class

    Public Class RecordDeletedEvent
        Inherits WebCustomEvent

        Shadows Const eventCode As Integer = WebEventCodes.WebExtendedBase + 10
        Shadows Const message As String = _
            "The {0} with ID = {1} was deleted by user {2}."

        Public Sub New(ByVal entity As String, ByVal id As Integer, _
                ByVal eventSource As Object)
            MyBase.New(String.Format(message, entity, id, _
                HttpContext.Current.User.Identity.Name), eventSource, eventCode)
        End Sub
    End Class
End Namespace

so that sorts the first peoblem. My second problem with the TBH Events in the web.config file within the healthmoitoring where is this referenced too? cant find anything on it in the solution?

Cheers Tupps








Similar Threads
Thread Thread Starter Forum Replies Last Post
Type 'RecordDeletedEvent' is not defined sstuber BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 May 21st, 2008 04:51 PM
ASCII code on keypress event ashokkumar .NET Framework 1.x 9 March 29th, 2007 07:50 AM
Type "RecordDeletedEvent" is not defined thuyvncr BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 March 7th, 2007 02:57 AM
click event code mohiddin52 Access VBA 1 February 14th, 2006 01:52 PM
Problem putting code on the right event - SubForm mmcdonal Access VBA 0 November 24th, 2004 01:55 PM





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