I have a data access layer, a business logic layer, and a presentation layer (i.e. the pages themselves).
I am handling the OnPreInit event and populating the collections needed for this page. All data comes from the SQL server database, and I do not use caching.
I am handling a button click event to capture values from a form and insert a new object into the database. The problem is that by the time I handle the click event, the collections are already full, so the new item that was inserted into the database was not found.
What is an acceptable solution for this?
I could insert a new object directly into the collection and re-link the GridView, but the SQL query selects only the set of objects, and the new object may fall outside this set.
Thank!
source
share