Please help!!!!!

I

imonline

Hi,
I want to create a web method which would return different
values on different time. Like when i submit an input and if there is
any problem in it it should return exception xml otherwise normal
xml...


How do i implement this? Please let me know. Any help is
highly appreciated!!


Thanks,
Nis
 
S

Scott M.

VB.NET

<WebMethod> Public Function checkStatus(X As Object) As String

If X (your logic here) Then
'Everything is good
Return "<Result>No problems</Result>"
Else
'Something is bad
Return "<Result>Problems Encountered</Result>"
End If

End Function

C#

[WebMethod] Public String checkStatus(Object X)
{
if (X [your logic here])
{
//Everything is good
return "<Result>No problems</Result>"
}
else
{
//Something is bad
return "<Result>Problems Encountered</Result>"
}
}
 
I

imonline

Hi Scott,
Thanks for the reply. I have got an alternative.


thanks,
Nis said:
VB.NET

<WebMethod> Public Function checkStatus(X As Object) As String

If X (your logic here) Then
'Everything is good
Return "<Result>No problems</Result>"
Else
'Something is bad
Return "<Result>Problems Encountered</Result>"
End If

End Function

C#

[WebMethod] Public String checkStatus(Object X)
{
if (X [your logic here])
{
//Everything is good
return "<Result>No problems</Result>"
}
else
{
//Something is bad
return "<Result>Problems Encountered</Result>"
}
}



imonline said:
Hi,
I want to create a web method which would return different
values on different time. Like when i submit an input and if there is
any problem in it it should return exception xml otherwise normal
xml...


How do i implement this? Please let me know. Any help is
highly appreciated!!


Thanks,
Nis
 

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

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top