Error messages web app

R

Robert Bravery

Hi all,

I am developing a web app.Using master pages. C# In it is a save method,
which retunrs true or false (saing to a sql server)
I want to notify the user of a save failure in two ways, check the error
from the SQL server if it is a duplicate key error, display a cutom message
to state such, if some other error, display some other custom error message.

Thanks
Robert
 
M

Michael Nemtsev

Hello Robert,

And the question is.....?

RB> Hi all,
RB>
RB> I am developing a web app.Using master pages. C# In it is a save
RB> method,
RB> which retunrs true or false (saing to a sql server)
RB> I want to notify the user of a save failure in two ways, check the
RB> error
RB> from the SQL server if it is a duplicate key error, display a cutom
RB> message
RB> to state such, if some other error, display some other custom error
RB> message.
RB> Thanks
RB> Robert
---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
G

Guest

Look in the MSDN index for "validation server controls". In particular, I
would suggest a custom validator along with a ValidationSummary control.

Dale
 
R

Robert Bravery

How can I notify users of this error, provising a suitable error message
that they will undersatand

Robert
 
M

Michael Nemtsev

Hello Robert,

As i undestand u got the error that SQL returns u.
So just use any label to inform about error or javascript with window.alert
(your_message) or use custom form and show its via javascript's showDialogBox

RB> How can I notify users of this error, provising a suitable error
RB> message that they will undersatand
RB>
RB> Robert
RB>
RB> RB>
Hello Robert,

And the question is.....?

RB> Hi all,
RB>
RB> I am developing a web app.Using master pages. C# In it is a save
RB> method,
RB> which retunrs true or false (saing to a sql server)
RB> I want to notify the user of a save failure in two ways, check
the
RB> error
RB> from the SQL server if it is a duplicate key error, display a
cutom
RB> message
RB> to state such, if some other error, display some other custom
error
RB> message.
RB> Thanks
RB> Robert
---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour
"At times one remains faithful to a cause only because its opponents
do
RB> not
RB>---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top