Server Error in '/' Application.

Requested value 'asc' was not found.

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.ArgumentException: Requested value 'asc' was not found.

Source Error:


Line 77: 
Line 78:         var sortValues = sortValue.Split('-');
Line 79:         var direction = (ProductSearch.SortDirection)Enum.Parse(typeof(ProductSearch.SortDirection), sortValues[1]);
Line 80:         var field = (ProductSearch.SortField)Enum.Parse(typeof(ProductSearch.SortField), sortValues[0]);
Line 81:         ProductList1.SortDirection = direction;

Source File: c:\websites\theultimatefinish.co.uk\htdocs\Store\Category\ProductList.aspx.cs    Line: 79

Stack Trace:


[ArgumentException: Requested value 'asc' was not found.]
   System.EnumResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument) +3977683
   System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult) +13114953
   System.Enum.Parse(Type enumType, String value, Boolean ignoreCase) +78
   System.Enum.Parse(Type enumType, String value) +11
   Store_Category_ProductList.OnInit(EventArgs e) in c:\websites\theultimatefinish.co.uk\htdocs\Store\Category\ProductList.aspx.cs:79
   System.Web.UI.Control.InitRecursive(Control namingContainer) +139
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +408


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