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 81:                         string[] name = Page.RouteData.Values["name"].ToString().Split(Convert.ToChar("-"));
Line 82:                         objSuccess.groom_name = name[0].ToString().Trim() == "1" ? String.Empty : name[0].ToString().Trim();
Line 83:                         objSuccess.bride_name = name[1].ToString().Trim() == "1" ? String.Empty : name[1].ToString().Trim();
Line 84:                         AppSessions.Current.bride_name = objSuccess.bride_name;
Line 85:                         AppSessions.Current.groom_name = objSuccess.groom_name;

Source File: \\fileserver\inetpub\vhosts\chavaramatrimony.com\httpdocs\2017\SuccessStoriesList.aspx.cs    Line: 83

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   SuccessStoriesList.Page_Load(Object sender, EventArgs e) in \\fileserver\inetpub\vhosts\chavaramatrimony.com\httpdocs\2017\SuccessStoriesList.aspx.cs:83
   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.4081.0