How to Call Webservices from Aspx Page same Method.

Jayakumars
Posted by Jayakumars under ASP.NET AJAX category on | Points: 40 | Views : 1458
1.How to Call Webservice Method in our Asp Page

WebService wb1=new WebService ();
string Rec1 = wb1.HelloWorld("Asp.net");
string Rec2 = wb1.HelloWorld("Asp.net","Dotnet");


Webservice like this

[WebMethod]
public string HelloWorld(string RecStr)
{
RecStr = RecStr + " " + "Welcome";
return RecStr;
}

[WebMethod]
public string HelloWorld(string RecStr, string RecStr1)
{
RecStr = RecStr1 + " " + "Welcome";
return RecStr;
}

Comments or Responses

Login to post response