我正在尝试显示 1. 如果 TimeReceived 为 Null,则显示红色,(或)2. 当 Time Received 不为 null 并且 Time Read 为 Null(或)时显示为琥珀色 3. Green 当 Time read 不为 null
它抛出一个错误
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:
我哪里出错了,如何根据条件显示图像。我想我没有正确完成行数据绑定。请帮忙。