Hi,
I'm developing a site that uses this book as a basis for separating the different layers.
I have a page with an ObjectDatasource and a Gridview connected to it using proper BLL and DAL classes to update rows in the database. Now, every time I do an update I want to display a message to the user using a label. By using the gridview's RowUpdated action in the code-behind file, I can get the number of rows affected by using e.AffectedRows (if it was working properly).
Code:
if (e.AffectedRows == 1)
lblFeedback.Text = "Row updated";
else if (e.AffectedRows < 1)
lblFeedback.Text = "Oooops";
It will always return "Oooops", but the database is still updated. Why isn't this working?
Another thing, assuming that this is working: would this be proper separation of the layers, or should I set the label's text in the BLL? If so, how can one do that?