Datasource Control Timeout (ASP.NET WebForms)

Below is a useful snipit of code, it sets the timeout for DataSource controls. Replace SqlDataSource with the ID of the datasource.

Protected Sub SqlDataSource_Selecting(sender As Object, e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles SqlDataSource.Selecting
e.Command.CommandTimeout = 1000
End Sub

Comments

Popular posts from this blog

qshape command not found - Postfix

Custom Form Error in Symfony 5 (form_errors)

Using variables within ajax success function that were set before ajax call (JQuery)