Hi, If I create Web Method with input parameter datatypes other than strings then the Web Method pukes with a "System.ArgumentException Can't convert to DateTime" when the field is left blank. e.g public string myWebMethod(DateTime StartDate) Is there a way to trap and handle this exception. Does this confine developers to only writing Methods with input parameters as Strings. Someones experience appreciated -- Regards Gordon
On Jun 20, 11:00 pm, Gordon wrote: > Hi, > > If I create Web Method with input parameter datatypes other than strings > then the Web Method pukes with a "System.ArgumentException Can't convert to > DateTime" when the field is left blank. > e.g public string myWebMethod(DateTime StartDate) > > Is there a way to trap and handle this exception. Does this confine > developers to only writing Methods with input parameters as Strings. > > Someones experience appreciated > > -- > Regards > > Gordon Hi Gordon You cannot pass null/empty. You can pass DateTime.MinValue to determine the intention of leaving this field empty. Tanzim Saqib http://www.TanzimSaqib.com