1

I have objectdatasource and I am trying to find a way to capture the error that is thrown by the SELECT method.

anyone idea how it can be done?

Page level error handling is preferred, not capturing error at the application_error in global.asax

thanks,

1 Answer 1

6

Like this:

protected void Page_Load(object sender, EventArgs e)
    {           
        ds.Selected += new ObjectDataSourceStatusEventHandler(ds_Selected);
    }

    void ds_Selected(object sender, ObjectDataSourceStatusEventArgs e)
    {
        if (e.Exception != null)
        {

        }
    }
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.