How to fix a System.FormatException when dropdownlist is set to default?
问题 I am having "An exception of type 'System.FormatException' occurred in mscorlib.dll but was not handled in user code." Additional information: Input string was not in a correct format. I have a dropdown list, #Carriers, when user selects an item no errors occur, however, when user selects the dropdownlist back to default it show this error. I need a way to write an if statement to check for null values. [AcceptVerbs(HttpVerbs.Get)] public JsonResult LoadAccsByCarrierId(string carrierid) { var