Pass null value to ASP.NET web service using HTTP POST? -
how pass null value asp.net web service when accessing via http post?
[webmethod] public string getresult(datetime date, int foo) { //do stuff here }
when calling method using http post, how pass null parameter? passing empty string makes server throw exception trying convert string parameter datetime. making datetime parameter nullable (i.e. datetime? date
) seems disallow calling via http.
neither of these can have null values. both value types , can't set null if attempted using code. recommend sending datetime.minvalue
, 0.
Comments
Post a Comment