Server Error in '/' Application.

'RegionID' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value

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.ArgumentOutOfRangeException: 'RegionID' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value

Source Error:


Line 43:             if (Request.Cookies["cookie_remember"] != null) RegionID.Text = Request.Cookies["cookie_remember"]["regionid"].ToString();
Line 44:             else RegionID.Text = "1";
Line 45:             RegionID.DataBind();
Line 46: 
Line 47:             string strRegionID = RegionID.Text;

Source File: c:\inetpub\wwwroot\prep2prep.com\httpdocs\sports\boysbaseball\Rankings.aspx.cs    Line: 45

Stack Trace:


[ArgumentOutOfRangeException: 'RegionID' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value]
   System.Web.UI.WebControls.ListControl.PerformDataBinding(IEnumerable dataSource) +1324
   System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +384
   System.Web.UI.WebControls.ListControl.PerformSelect() +43
   _sports_boysbaseball_Rankings.SetDefaults() in c:\inetpub\wwwroot\prep2prep.com\httpdocs\sports\boysbaseball\Rankings.aspx.cs:45
   _sports_boysbaseball_Rankings.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\prep2prep.com\httpdocs\sports\boysbaseball\Rankings.aspx.cs:23
   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.3770.0