How do I pass a null value to an ASP.NET web service when accessing it via HTTP POST?
[WebMethod]
public string GetResult(DateTime date, int foo)
{
//do stuff here
}
When calling this method using HTTP POST, how do I pass a null parameter? Passing empty string just makes the server throw an exception trying to convert the string parameter to a DateTime. Making the DateTime parameter nullable (i.e. DateTime? date) seems to disallow calling it via HTTP.