Server Error in '/' Application.

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

Source Error:


Line 52:                         ltrotherdhd_2.Text += "<li>";
Line 53:                         ltrotherdhd_2.Text += "<img src=\"../../Design/dot_news_xh.png\">";
Line 54:                         ltrotherdhd_2.Text += "<p><a href='" + Link.DetailProduct(list[j].TieuDe_Vn, list[j].ID.ToString()) + "'>";
Line 55:                         ltrotherdhd_2.Text += Total.ToTitleCase(list[j].TieuDe_Vn) + "<i>(" + ConvertType.ToShorDateString(list[j].NgayCapNhat) + ")</i>";
Line 56:                         ltrotherdhd_2.Text += "</a></p></li>";

Source File: d:\inetpub\vhosts\phanchutrinhbinhthuan.edu.vn\httpdocs\Vn\Products.aspx.cs    Line: 54

Stack Trace:


[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) +64
   System.ThrowHelper.ThrowArgumentOutOfRangeException() +15
   System.Collections.Generic.List`1.get_Item(Int32 index) +7515592
   Vn_Products.PopulateControls(Int32 pageIndex) in d:\inetpub\vhosts\phanchutrinhbinhthuan.edu.vn\httpdocs\Vn\Products.aspx.cs:54
   Vn_Products.Page_Load(Object sender, EventArgs e) in d:\inetpub\vhosts\phanchutrinhbinhthuan.edu.vn\httpdocs\Vn\Products.aspx.cs:26
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


Version Information: Microsoft .NET Framework Version:2.0.50727.8964; ASP.NET Version:2.0.50727.8962