473,545 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error Handling in ASP.NET datagrid in a ntier design

4 New Member
I have an ntier application.
I am trying to determine what is the best practice for handing errors in a datagrid.

My datagrids are able to add, update and delete data. I am using a objectdatasourc e to access a proxy which calls a remote business object. The objectdatasourc e uses a custom class to pass the data to the business layer.
The business layer method returns true or false.

When false is returned I want to be able to handle this. And display the business level error message.
Currently I am testing 2 methods of returning the message, via the custom object and via an exception (not preferred). The error is not consdiered exceptional; just an error. eg. username already exists.

I can access my object in the onUpdating, though I require my object in the OnUpdated objectdatasourc e event. How can I access the object on return?

Am I simply going about things the wrong way or is there a best practice of returning friendly errors from a business layer (remote) and handling them on the UI.

Any input would be appreciated.
Mar 26 '07 #1
0 1026

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1054
by: tstephan | last post by:
In the past we have used the classic nTier design with COM+, SQL Server and MFC. We are currently working on a new project with an opportunity to use .NET, ADO.NET, etc. One of the areas where I don't find a clear migration path is with security. In the classic method, the server side tiers were installed under COM+ and run as a known user....
12
6652
by: Christian Christmann | last post by:
Hi, assert and error handling can be used for similar purposes. When should one use assert instead of try/catch and in which cases the error handling is preferable? I've read somewhere that assert could be used to start an interactive debugger automatically. How do I realize that on a Linux machine using gcc?
16
7197
by: TD | last post by:
This is the code under a command button - Dim ctl As Control For Each ctl In Me.Controls If ctl.BackColor <> RGB(255, 255, 255) Then ctl.BackColor = RGB(255, 255, 255) End If Next ctl
4
2110
by: The Alchemist | last post by:
I am having a problem with a dynamically-generated Datagrid. It is important to point out that this problem does not exist with a design-time created Datagrid, but only with a dynamically generated Datagrid in a Web Custom Control (WCC) : The datagrid has LinkButton Column which has a select LinkButton for each row. When this button is...
2
1898
by: Iams | last post by:
When your program gets an error, is there a name of that Exception somewhere on that error page so that you can trap it with the correct exception name? For instance, I errored when attempting to bind a grid, because a field didn't exist in the query that was on the grid. How do I find the name of the exception and trap the error? The error...
0
957
by: chopsnsauce | last post by:
Hello, I've just written, my first .NET Windows application and I've noticed that when running my App in the design time enviroment the error handling works like this: Say I've gat a method called Import that opens a form frmReplace. Import has error handling but frmReplace_Load does not. In Design-Time enviroment if an error occurrs...
3
2217
by: Agnes | last post by:
My client hold its MS SQL server in hkbranch, Both china and hong kong office can run the vb.net application very well via VPN. Now, they want to reduce cost and move the MS SQL server to china 's data centre . During testing period, the user cannot connect to the SQL server and alwasy got "General Network Error", we said that the network...
1
1865
by: GS | last post by:
Any points of what would be the good error handling design for application? User error handling in Application_OnError and throw() new errors on conditions through the code? I'd like utlimiately to consolidate all error_handling in one method which I'll be able to easily modify to write to event log or text file etc instead of error hanlding...
9
2548
by: arnuld | last post by:
Can anyone point me to some online/offline document on error handling in C ? I am doing some Socket Programming in C and feeling a lots of difficult in error handling :( Also some time ago some one told me that when I get an error then I can create a generic function which, when called within some function will print the name of that...
0
7486
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7416
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
6001
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5347
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4965
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3473
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3456
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1032
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
729
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.