User1717218719 posted
I have the followig code in which I am recieveing the error "
Input string was not in a correct format." on the line:
textbx.Text = CDec(tmpTbl("Com").ToString).ToString("0.00")
I am trying to set the value of a textbox on my webpage using the value in the sql datatable
The code I have is the following:
comComm = New SqlCommand
With comComm
.Connection = conConn
.CommandType = CommandType.Text
.CommandText = "SELECT * FROM TABLE WHERE (X = @X)"
.Parameters.AddWithValue("@X", argparam)
End With
adpAdap = New SqlDataAdapter(comComm)
adpAdap.Fill(Dst, "tbl")
Dim tmpTbl As DataTable = argDst.Tables("tbl")
If tmpTbl.Rows.Count > 0 Then
txtBx.Text = CDec(tmpTbl("Com").ToString).ToString("0.00")
End If