简体   繁体   中英

failed to load net::ERR_CONTENT_LENGTH_MISMATCH

I have stuck in a strange problem. I have a web form in which I am binding a repeater(child) inside repeater(parent) on databound of parent repeater. It works fine on my machine over the network. But at the client side, binding to the child repeater doesn't happen. I have checked in google chrome at the client side by inspecting element it shows me "net::ERR_CONTENT_LENGTH_MISMATCH" error but at my machine it doesn't show the same error.

I am binding the child repeater using following code

protected void parent_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
    if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
    {
        try
        {
            HiddenField emid = (HiddenField)e.Item.FindControl("hdnemId");
            string id = emid.Value;
            DataTable dt = Employee.GetAllEmployee(int.Parse(emid.Value), 1);
            Repeater childrpt = (Repeater)e.Item.FindControl("child1");
            childrpt.DataSource = dt;
            childrpt.DataBind();
        }
        catch (Exception ex)
        {
            Utilities.LogError(ex);
        }
    }
}

If I comment the "childrpt.DataBind();" then page execution successfully completed with all the parent rows else only first parent row is bind and page loading stops some time later. This behaivour is experienced only on client's premises where as on my the page is executed as expected. There are no images in repeater.

根据此错误 ,当外部资源长度与响应中给定的Content-Length标头不匹配时,将发生此错误。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM