i removed the call event from fillcartfromdb()
also removed try catch block
when i view it in browser, and navigate through pages, at the shopping cart page, total is not displayed.
when i clciked the button1, it says
System.FormatException: Input string was not in a correct format.
Source Error:
Line 69:
Line 70: Dim quantity As Integer = Integer.Parse(t.Text)
Line 71: Dim unitprice As Decimal = Decimal.Parse(dgi.Cells(2).Text)
Line 72: total = total + (unitprice * quantity)
Line 73:
Source File: C:\Inetpub\wwwroot\ShoppingCart3VB\MyCart.aspx.
vb Line: 71
Stack Trace:
[FormatException: Input string was not in a correct format.]
System.Number.ParseDecimal(String s, NumberStyles style, NumberFormatInfo info) +0
System.Decimal.Parse(String s, NumberStyles style, IFormatProvider provider) +30
System.Decimal.Parse(String s) +9
ShoppingCart3VB.MyCart.Button1_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\ShoppingCart3VB\MyCart.aspx.
vb: 71
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +108
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +57
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
System.Web.UI.Page.ProcessRequestMain() +1292