VB.NET Convert String to Int throws error : Input String was not in a correct format -
i using .net framework 1.0 , try convert string int throws error input string not in correct format
take @ code
dim total integer total = (convert.toint32(me.lbloldqty.text)) - (convert.toint32(me.txtqty.text)) dim value string = me.lbloldqty.text + " - " + me.txtqty.text + " = " + convert.tostring(total) me.lblnewvalue.text = value
i tried using cint , integer.parse same result.
any appreciated
try :
dim total integer total = integer.parse(lbloldqty.text) - integer.parse(txtqty.text) dim value string = lbloldqty.text + " - " + txtqty.text + " = " + convert.tostring(total) lblnewvalue.text = value
use breakpoint while execution , check if values passing correctly lbloldqty.text
, txtqty.text
Comments
Post a Comment