Server Error in '/' Application.

Input string was not in a correct format.

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.FormatException: Input string was not in a correct format.

Source Error:


Line 69:         catch
Line 70:         {
Line 71:             pro_ProductPrice = dbConnect.pro_ProductPrices.SingleOrDefault(n => n.Id == int.Parse(Request["Id"].Split(',')[0]));
Line 72:             if (pro_ProductPrice != null)
Line 73:             {

Source File: c:\webspace\dongagroup.vn\httpdocs\danhmuc\detail.aspx.cs    Line: 71

Stack Trace:


[FormatException: Input string was not in a correct format.]
   System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +14542542
   System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +174
   lambda_method(Closure ) +169

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
   System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +269
   System.Delegate.DynamicInvokeImpl(Object[] args) +160
   System.Data.Linq.CommonDataServices.GetKeyFromPredicate(MetaType type, Dictionary`2 keys, Expression mex, Expression vex) +565
   System.Data.Linq.CommonDataServices.GetKeysFromPredicate(MetaType type, Dictionary`2 keys, Expression expr) +330
   System.Data.Linq.CommonDataServices.GetKeyValues(MetaType type, LambdaExpression predicate) +114
   System.Data.Linq.CommonDataServices.GetCachedObject(Expression query) +730
   System.Data.Linq.SqlClient.SqlProvider.GetCachedResult(Expression query) +72
   System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) +107
   System.Data.Linq.Table`1.System.Linq.IQueryProvider.Execute(Expression expression) +51
   danhmuc_detail.Page_Load(Object sender, EventArgs e) in c:\webspace\dongagroup.vn\httpdocs\danhmuc\detail.aspx.cs:71
   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.4682.0