im using vb. To summarize, i have a textbox where user input quantity and a gridview to display the price. i also have a submit button to calculate the totalprice where totalprice = quantity * price. meanwhile im using a label to store the value price. Dim tmp As Double = e.Row.Cells(3).Text.Trim Label1.Text = "$" + (tmp).ToString("0.00")
this is the submit coding myCommand.CommandText = "INSERT INTO [Order] ([Quantity], [TotalPrice]) VALUES ('" & CStr(Me.txtQty.Text) & "',__________)" is ________ me.txtQty * Label.Text ?? i need to know what should be the correct way.
thanks in advance. Much appreciated.