Server Error in '/' Application.

Index was outside the bounds of the array.

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.IndexOutOfRangeException: Index was outside the bounds of the array.

Source Error:


Line 432:		private void setCurrentPath( int depth, int categoryId )
Line 433:		{
Line 434:			PathArray[PathIndex + depth] = categoryId;
Line 435:			for( int i = PathIndex + depth + 1; i < PathArray.Length; i++ )
Line 436:			{

Source File: w:\vhosts\meddirect.co.nz\httpdocs\View.aspx.cs    Line: 434

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   MedDirect.Internet.Web.Migrated_View.setCurrentPath(Int32 depth, Int32 categoryId) in w:\vhosts\meddirect.co.nz\httpdocs\View.aspx.cs:434
   MedDirect.Internet.Web.Migrated_View.GetBindDataName(Object dataItem) in w:\vhosts\meddirect.co.nz\httpdocs\View.aspx.cs:458
   ASP.view_aspx.__DataBind__control11(Object sender, EventArgs e) in w:\vhosts\meddirect.co.nz\httpdocs\View.aspx:65
   System.Web.UI.Control.OnDataBinding(EventArgs e) +132
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +170
   System.Web.UI.Control.DataBindChildren() +11162975
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182
   System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean useDataSource) +674
   System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +68
   System.Web.UI.Control.DataBindChildren() +11162975
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182
   System.Web.UI.Control.DataBindChildren() +11162975
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182
   System.Web.UI.Control.DataBindChildren() +11162975
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +182
   MedDirect.Internet.Web.Migrated_View.Page_Load(Object sender, EventArgs e) in w:\vhosts\meddirect.co.nz\httpdocs\View.aspx.cs:80
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


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