c# - ASP .NET - How to refresh a databound DataList? -
I have a datalist that is bound to a SQLDataSource. The SQLDataSource table contains a stored procedure value containing the maximum Indentation value in the table.
On the same page as the datelast I have a description view 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 can I update the data list automatically?
Call calllist call for example:
Load information as info (view sender, see details, unlinked eventArgs e) {//}. Refresh the DataList control after inserting a new record in the Detail View Control. YourDataList.DataBind (); }
and in markup:
& lt; Asp: DetailsView id = "YourDetailsView" runat = "server" DataSourceID = "YourSQLDataSourceID" OnItemInserted = "YourDetailsView_ItemInserted" />
Comments
Post a Comment