Re: Please help!!!!!

Tech-Archive recommends: Fix windows errors by optimizing your registry



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" <nisdes@xxxxxxxxx> wrote in message
news:1164351275.294173.215140@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
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



.



Relevant Pages

  • RE: Error when WebMethod returns a jagged array
    ... incoming and outgoing messages. ... > type of the WebMethod contains a jagged array. ... > public string description; ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Initializing static variables
    ... [WebMethod] ... public string InitR6 ... lock ) ... they recommend locking a static object: ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Please help!!!!!
    ... Scott M. wrote: ... <WebMethod> ... Public Function checkStatusAs String ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Member variables in Web Service class
    ... [WebMethod] ... public String SayGoodbye() ... Even though I keep an instance of the web service on my client. ... I know I can use the Session object, but I was lead to believe that it isn't best to use the ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: needing help - constructor overloading
    ... webmethod the service expose? ... Private Sub InitService ... Public Function AnyMethodas String ...
    (microsoft.public.dotnet.framework.aspnet.webservices)