Server Error in '/' Application.

Item has already been added. Key in dictionary: '0'  Key being added: '0'

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.ArgumentException: Item has already been added. Key in dictionary: '0'  Key being added: '0'

Source Error:


Line 143:                    cate.SubCateName = dr[3].ToString();
Line 144:                    cate.Orders = Convert.ToInt32(dr[4].ToString());
Line 145:                    catList.Add(cate.Orders, cate);
Line 146:                    
Line 147:                }                

Source File: d:\vhosts\vienmy.vn\httpdocs\mainCat.aspx.cs    Line: 145

Stack Trace:


[ArgumentException: Item has already been added. Key in dictionary: '0'  Key being added: '0']
   System.Collections.SortedList.Add(Object key, Object value) +7724763
   NewsDetail.getCateListByMainCate() in d:\vhosts\vienmy.vn\httpdocs\mainCat.aspx.cs:145
   NewsDetail.Page_Load(Object sender, EventArgs e) in d:\vhosts\vienmy.vn\httpdocs\mainCat.aspx.cs:91
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +43
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2600


Version Information: Microsoft .NET Framework Version:2.0.50727.9061; ASP.NET Version:2.0.50727.9062