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 263:        string[] temp = strimg.Split('.');
Line 264:        string strextension = "";
Line 265:        strextension = temp[1].ToString();
Line 266:        strimg = strimg.Replace("." + strextension, "_desc." + strextension);
Line 267:        string outimg = "";

Source File: c:\HostingSpaces\linktoexpert\linktoexpert.com\wwwroot\shopping-product-desc.aspx.cs    Line: 265

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   shopping_product_desc.getimg(String strimg, Int32 varistabav) in c:\HostingSpaces\linktoexpert\linktoexpert.com\wwwroot\shopping-product-desc.aspx.cs:265
   ASP.shopping_product_desc_aspx.__RenderContent1(HtmlTextWriter __w, Control parameterContainer) in c:\HostingSpaces\linktoexpert\linktoexpert.com\wwwroot\shopping-product-desc.aspx:23
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +115
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +253
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +87
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +53
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
   System.Web.UI.Page.Render(HtmlTextWriter writer) +38
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4240


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