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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -