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

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -