怎么,if((bool)ViewState["SortDesc"]) 报错Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 66: {
Line 67: string Sort;
Line 68: if((bool)this.ViewState["SortDesc"])
Line 69: {
Line 70: Sort = "<img src='../Images/Sort1.gif'>";//??????