N
NewsMonkey
Hi All,
I have been working on a few ASP.NET applications recently that access
database resources frequently. I have been trying to find a consistent
way of displaying both the success and failure of various operations to
the user. For example, if a new record is successfully added then I
would like to display a short message saying "The record has been added
successfully". Likewise if an error occurs then I would like to display
the "Message" attribute of the exception that was thrown.
The problem I am having, is coming up with a consistent method of
displaying these messages. Should I place the message into a Session
object and then redirect to a new page that reads the message from the
Session object? Another method I could use would be to place the error
message into the body of a hidden "<DIV></DIV>" element and then set the
visibility to "visible". I guess I am just looking for tips and
techniques that others use to accomplish this sort of task, also, any
"tutorial/articles" that might cover this subject would be very helpful.
It would be great if I could "aggregate" the functionality into a
reusable class or object and just use it within other asp.net
applications. Thanks in advance for any help!
- DereTheGeek
I have been working on a few ASP.NET applications recently that access
database resources frequently. I have been trying to find a consistent
way of displaying both the success and failure of various operations to
the user. For example, if a new record is successfully added then I
would like to display a short message saying "The record has been added
successfully". Likewise if an error occurs then I would like to display
the "Message" attribute of the exception that was thrown.
The problem I am having, is coming up with a consistent method of
displaying these messages. Should I place the message into a Session
object and then redirect to a new page that reads the message from the
Session object? Another method I could use would be to place the error
message into the body of a hidden "<DIV></DIV>" element and then set the
visibility to "visible". I guess I am just looking for tips and
techniques that others use to accomplish this sort of task, also, any
"tutorial/articles" that might cover this subject would be very helpful.
It would be great if I could "aggregate" the functionality into a
reusable class or object and just use it within other asp.net
applications. Thanks in advance for any help!
- DereTheGeek