Raising the ErrorSavingEvent


Author
Message
Charles Thomas Blankenship...
Charles Thomas Blankenship
Advanced StrataFrame User (706 reputation)Advanced StrataFrame User (706 reputation)Advanced StrataFrame User (706 reputation)Advanced StrataFrame User (706 reputation)Advanced StrataFrame User (706 reputation)Advanced StrataFrame User (706 reputation)Advanced StrataFrame User (706 reputation)Advanced StrataFrame User (706 reputation)Advanced StrataFrame User (706 reputation)
Group: Awaiting Activation
Posts: 172, Visits: 12K
Howdy StrataFramers:



I'm trying to handle the ErrorSaving event of a business object that is used on an .ASPX page and that is referenced in the ApplicationBasePage as such.



Public WithEvents oPrefix As Prefix



On the page where the saving is taking place I put the following code as per the help topic ErrorSaving:



Private Sub ErrorSaving(ByVal e As MicroFour.StrataFrame.Business.ErrorSavingEventArgs) Handles oPrefix.ErrorSaving



Dim lcErrorText As String = ""

lcErrorText = Me.GenerateWarningTable(e.ToString)

SetErrorsLabelState("Show", lcErrorText)



End Sub



But I get an error saying the signatures do not match. It looks like the ErrorSaving example caters to WinForms so I guess my question is how do I snag this event in an ASPX page so I can capture the Unique Key Violation message from the database and display it to the user. I tried the same thing in the web example from Micro4 and the same error occurs. I guess I'm doing the same thing incorrectly in both places. Wink



Thanks guys,



CT

Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com
Reply
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
Well, CT, I'm not sure.  My quick sample didn't give me any errors when adding a new handler to the ErrorSaving event of a business object.  I defined the business object within the ApplicationBasePage and then added this code to my Default.aspx.vb file and it compiles fine.  Does it give you an error at runtime?

Public Sub HandleErrorSaving(ByVal e As MicroFour.StrataFrame.Business.ErrorSavingEventArgs) Handles MyBO.ErrorSaving

End Sub


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search