What is the best way to validate WebMethod params .
I guess this not best practice:
[WebMethod]
public string HelloWorld(String sayHi)
{
if (sayHi.Equals(""))
{
throw new Exception("User not provided");
}
return "String OK";
}
Thanks
How about this:
You should use
stringnotString.