I have implemented web service i have one call where two parameter is passing. I want to handle the exception if someone do any mistake with parameters.
Like This
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public void Test(string mobile, string amount)
{
//Code
}
I want that it will catch these type condition.
- If some one pass only one parameter.
- If someone change the name of parameter like mobile to mobile1
my service responding unhandled exception. I want to handle these condition too. Thanks in advance.