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
Replies
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
Here is what the code and the error looks like ... it looks like what you put in your post is exactly what I tried. Hummm ... obvious missing something silly here.



CT

Charles T. Blankenship
Senior Consultant
Novant Consulting, Inc.
704.975.7152
http://www.novantconsulting.com
Attachments
RaisingErrorSaving.jpg (142 views, 57.00 KB)
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, that is the exact same code that I added to my website.  So, the only thing that I can think of is that maybe it thinks that the signatures are incorrect because DLLs referenced might not be the same version?  Check your web.config file for the website and make sure the DLLs are on 1.5.0.0 and you might rebuild your business object library just to make sure.  I've seen problems when the website was referencing Release DLLs and the BOLibrary was referencing the Debug DLLs, they thought they needed to pull from 2 different folders.

But, by all means, that should work perfectly...

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