I am trying to display 1. Red if the TimeReceived is Null, (or) 2. Amber when Time Received is not null and Time Read is Null (Or) 3. Green When Time read is not null
It throws an error
Input string was not in a correct format.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.FormatException: Input string was not in a correct format.
Source Error:
Line 86: {
Line 87: Image img = (Image)e.Row.FindControl("image1");
Line 88: switch (int.Parse(e.Row.Cells[1].Text))
Line 89: {
Line 90: case 0:
Where I am going wrong, how can I display image based on the condition. I think I haven't done the rowdatabound correctly. Please help.