I have a DataList that is bound to a SQlDataSource.
The SQLDataSource returns a stored procedure value containing the max indentity value in a table.
On the same page as the DataList I have a DetailsView that is used to add new records to the table.
The problem is that after adding a new record to the table the Datalist value shows the previous indentity value.
How do I have the page automatically refresh the DataList?
Call DataList.DataBind() in either the page load method or the ItemInserted method of the Details View.
For example:
And in the markup: