Given:
VB Code:
  1. Try
  2.                     Dim t As String = e.Item.Cells(3).Text
  3.                     Response.Write("<h4>" & t & "</h4>")
  4.                     Dim dd As Double = Double.Parse(t)
  5.                     'Response.Write(e.Item.Cells(3).Text)
  6.                     If dd < 0.1 Then
  7.                         e.Item.Cells(0).BackColor = System.Drawing.Color.FromArgb(&HD1, &H3D, &H47)                      'red
  8.                     ElseIf dd > 100 Then
  9.                         e.Item.Cells(0).BackColor = System.Drawing.Color.FromArgb(&H81, &HB4, &H4B)                      'green
  10.                     Else
  11.                         Response.Write(ColorFade(&HEFF773, &HD13D47, dd).ToString & " Color Faded from " & e.Item.Cells(3).Text.ToString() & "<hr>")
  12.                         e.Item.Cells(0).BackColor = System.Drawing.Color.FromArgb(ColorFade(&HEFF773, &HD13D47, dd))
  13.                     End If
  14.                 Catch ee As Exception
  15.                     Dim i As Integer
  16.                     For i = 0 To e.Item.Cells.Count - 1
  17.                         Response.Write(e.Item.Cells(i).Text & " : ")
  18.                     Next
  19.                     Response.Write(":No Decimal conversion " & e.Item.Cells(3).Text & ":" & ee.Message & "<br>")
  20.                 End Try

If e.item.cells(3) is within the range of .99999999 to -.9999999, then the error 'Cast from string "15726451-1364743165280" to type 'Double' is not valid' occurs. I DID NOT attempt to double.parse a string of "15726451-1364743165280"!!

Why is this occurring:

Page output using above code:

0.502680311890838
: : 275 : 0.502680311890838 : 100 : UNASSIGNED : UNASSIGNED : : TS : Outbound : : : : : 6 : : 3 : : :No Decimal conversion 0.502680311890838:Cast from string "15726451-1364743165280" to type 'Double' is not valid.

0.807479804907788
: : 591 : 0.807479804907788 : 100 : UNASSIGNED : UNASSIGNED : : TS : Outbound : : : : : 6 : : 3 : : :No Decimal conversion 0.807479804907788:Cast from string "15726451-1364743165280" to type 'Double' is not valid.