小编Bha*_*van的帖子

C#.net中的超时异常

 public DataTable GetDailycardReport(DailyReportPL dailyreportpl)
    {
        DataTable dtGetDailycardReport = new DataTable();
        try
        {
            SqlParameter[] arParams = new SqlParameter[2];

            arParams[0] = new SqlParameter("@farmername", typeof(string));
            arParams[0].Value = dailyreportpl.farmername;

            arParams[1] = new SqlParameter("@batchno", typeof(int));
            arParams[1].Value = dailyreportpl.batchno;

            dtGetDailycardReport.Load(SqlHelper.ExecuteReader(connection.ConnectionString, CommandType.StoredProcedure, "k_DailyCardreport", arParams));
        }
        catch (Exception ex)
        {

            //DBExceptionPublisher exc = new DBExceptionPublisher();
            //exc.Publish(ex);
        }
        finally
        {

        }
        return dtGetDailycardReport;

    }
Run Code Online (Sandbox Code Playgroud)

例外::

"Timeout expired.  The timeout period elapsed prior to completion of 
    the operation or  the   server is not responding."
Run Code Online (Sandbox Code Playgroud)

当我将参数传递给存储过程时,它捕获了异常并显示上面的消息" webconfig.如何在文件中将命令超时增加到200. 我在谷歌搜索但没有优化结果.

c# c#-4.0

4
推荐指数
2
解决办法
8782
查看次数

如何在Content Place持有者中循环控件

protected void btnbatch_Click(object sender, EventArgs e)
{       
    Button btnactual= sender as Button;
    ContentPlaceHolder myContent =
(ContentPlaceHolder)this.Master.FindControl("ContentPlaceHolder1");
}
Run Code Online (Sandbox Code Playgroud)

如何在内容占位符中找到控件for-each.我将代码放入,Div tag 但我没有得到.

谁能帮我吗?

c# asp.net

2
推荐指数
1
解决办法
1635
查看次数

标签 统计

c# ×2

asp.net ×1

c#-4.0 ×1