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 25:         string[] splitUrl = url1.Split('&');
Line 26:         string fromIATA = splitUrl.GetValue(0).ToString().Split('?').GetValue(1).ToString().Split('=').GetValue(1).ToString();
Line 27:         string toToIATA = splitUrl.GetValue(1).ToString().Split('=').GetValue(1).ToString();
Line 28:         string ddate = splitUrl.GetValue(2).ToString().Split('=').GetValue(1).ToString();
Line 29:         string rdate = splitUrl.GetValue(3).ToString().Split('=').GetValue(1).ToString();

Source File: e:\UK\Airwaayuk\Gateway_Airwaay.co.uk\Airwaay.co.uk\Airwaay\loader.aspx.cs    Line: 27

Stack Trace:


[IndexOutOfRangeException: Index was outside the bounds of the array.]
   System.Array.InternalGetReference(Void* elemRef, Int32 rank, Int32* pIndices) +0
   System.Array.GetValue(Int32 index) +80
   loader.Page_Load(Object sender, EventArgs e) in e:\UK\Airwaayuk\Gateway_Airwaay.co.uk\Airwaay.co.uk\Airwaay\loader.aspx.cs:27
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


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