LblSubTotal.Text = GetItemTotal().ToString("N2");
String subTotal = LblGST.Text;
String GST = "subTotal * 0.07";
GST = LblGST.Text;
It since that my GST is not * 7% of the subTotal please help with this as the subprice have price
It since that my GST is not * 7% of the subTotal please help with this as the subprice have price

VulpesRank #55 · 29.2K reputationPosted Aug 4, 2013, 10:27 AM EDT
Dim ST As Double
Double.TryParse(LblSubTotal.Text, ST)
Dim GST As Double = 0.07 * ST
LblGST.Text = GST.ToString("N2")
Tan Kai Kai114 reputationPosted Aug 4, 2013, 3:04 PM EDT
becasue my st is a vlaue that grab from a method
VulpesRank #55 · 29.2K reputationPosted Aug 4, 2013, 11:32 PM EDT
I used Double.TryParse in my earlier post because, if the string can't be converted to a double for some reason, then this method will set ST to the 'harmless' value of zero.