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 83:
Line 84: Dim shopcart3 As ShoppingCart.shopcart = New ShoppingCart.shopcart
Line 85: shopcart3.DeleteItem(Session.SessionID, Integer.Parse(e.Item.Cells(0).Text))
Line 86:
Line 87:
Source File: C:\Inetpub\wwwroot\ShoppingCart3VB\MyCart.aspx.
vb Line: 85
Stack Trace:
[FormatException: Input string was not in a correct format.]
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +0
System.Int32.Parse(String s) +38
ShoppingCart3VB.MyCart.DataGrid1_DeleteCommand(Obj ect source, DataGridCommandEventArgs e) in C:\Inetpub\wwwroot\ShoppingCart3VB\MyCart.aspx.
vb: 85
System.Web.UI.WebControls.DataGrid.OnDeleteCommand (DataGridCommandEventArgs e) +110
System.Web.UI.WebControls.DataGrid.OnBubbleEvent(O bject source, EventArgs e) +589
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
System.Web.UI.WebControls.DataGridItem.OnBubbleEve nt(Object source, EventArgs e) +100
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e) +120
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +115
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +138
System.Web.UI.Page.ProcessRequestMain() +1292