How do I validate a WebMethod's properties?

R

RobertP

If I have a WebMethod that takes a parameter, what is the correct way to
validate it? I could throw an exception, but that does not seem right.

public DataSet TestMethod( string MyString )
{
// Validation Code
if ( MyString =="InvalidValue" )
Throw SoapException();

// Real code starts here
return ds;
}
 
R

RobertP

Totally missed the post by Mark yesterday. I with the information posted
there unless anyone has any additional words of wisdom to add.

Thanks!
 
M

Manohar Kamath

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,241
Members
46,831
Latest member
RusselWill

Latest Threads

Top