Wednesday, June 3, 2015

SqlDataSource Timeout issue C# asp.net

SqlDataSource Timeout issue


 <asp:SqlDataSource ID="SqlDataSource1" runat="server" onselecting="dsTest_Selecting"
        ConnectionString="<%$ ConnectionStrings:BUDGETReports %>"
        ></asp:SqlDataSource>




Code behind


 protected void dsTest_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
    {
        e.Command.CommandTimeout = 1000;
    }

No comments: