New Posts New Posts RSS Feed: AspDataSource reporting errors to the UI
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

AspDataSource reporting errors to the UI

 Post Reply Post Reply
Author
jcdk View Drop Down
Newbie
Newbie


Joined: 25-Aug-2007
Location: Denmark
Posts: 11
Post Options Post Options   Quote jcdk Quote  Post ReplyReply Direct Link To This Post Topic: AspDataSource reporting errors to the UI
    Posted: 15-Aug-2008 at 2:29am
Hi,
 
I have a situation in my ASP application, where the ASPDataSource (or rather the AdapterManager) may discover a problem with the data being inserted. I can not discover this problem with validators, because it is a rather complex calculation involving other data in the database. The checks have been build into the model.
 
My problem is how I inform the user about the problem. Is there a way that I can have the AdapterManager tell the ASPDataSource that there is a problem, and have the datasource show a messagebox or something similar?
 
The apllication uses an ASP FormView to hold the controls, and I have considered to have the FormViews OnItemInserting event actually copy the data to an Entity and perform the test, but I find that a very messy solution as it mixes UI with datamanipulation, so I would much rather have the ASPDataSource (or AdapterManager) report back somehow.
 
Any help appriciated.
 
Best regards
Jesper Carstensen
Back to Top
davidklitzke View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 14-Jun-2007
Posts: 715
Post Options Post Options   Quote davidklitzke Quote  Post ReplyReply Direct Link To This Post Posted: 18-Aug-2008 at 8:18am
Jesper,
 
I totally agree with you that modifying the UI to perform validation is, in general. not the best way to perform verification.  You really want the verification to happen independently of the UI.  In Windows Forns, we are fortunate to have an Error provider which not only works well with .NET controls, but third party controls as well.   In ASP.NET, there us no such mechanism, so there is no way for IdeaBlade Verification to send error messages to an error provider.  If you know of such  an error provider, I woulde love to know about it.  Remember also that the AspDataSource is designed to not only work with .NET Web Controls, but also thirf party Web Controls from Dev Express, Infragistics, and Telerik.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down