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 985:            + "     , itCat1.prodotti_categorie_layout2                    AS layout2 "
Line 986:            + getItemListWhereCond(cat_id, true)).Tables[0];
Line 987:        System.Data.DataRow itemDettDR = itemDettDT.Select("ID = " + item_id)[0];
Line 988:        prodotti_venditaSuPreventivo.Value = itemDettDR["prodotti_venditaSuPreventivo"].ToString();
Line 989:        if (livello_varianti_REP.Items.Count == 0 && !IsPostBack)

Source File: c:\inetpub\wwwroot\franzasas\nprodotti.aspx.cs    Line: 987

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   _nprodotti.getItemDetail(String cat_id, String item_id, String lang) in c:\inetpub\wwwroot\franzasas\nprodotti.aspx.cs:987
   _nprodotti.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\franzasas\nprodotti.aspx.cs:261
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4063.0