Hi Victor,
Thank you for posting in the MSDN newsgroup.
As for the SqlDataSource control, so far it is still concentrating on data
displaying and updating. When there occurs error in the backend database,
the SqlDataSource control (ASP.NET application layer) will simply throw out
an exception. Since SqlDataSource control doesn't provide built-in events
for error handling, we need to do the exception handling through general
try....catch... block in the code path. And this will require us to
programmtically invoke the FormView's update method in order to control
the code path. e.g:
====================
protected void Button1_Click(object sender, EventArgs e)
{
try
{
FormView1.InsertItem(true);
}
catch (Exception ex)
{
Response.Write("<br/>" + ex.ToString());
}
}
======================
Or you can also consider using page's Page_error event, this event can
capture all the unhandled exceptions in the page's processing path. You can
redirect the user to a custom error/recovery page ...
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)