Web Service how to return string value

Dear Friends,

I need to return a raw string value from the webservice without XML tags in it. Can anybody let me know how to achieve this. It would be great if i can get a small example for this.

Thank you
Madhu
MadhuMenongAsked:
Who is Participating?
 
Marcin_ZawadzkiConnect With a Mentor Commented:
If you have to just return string value than make web service

[WebMethod]
public string HelloWorld(){
   return "Hello";
}

if you want to sent plain string on HTTP, than this will be no web service:

Just make aspx page and :

Response.Clean();
Resposne.Write("HelloWorld");
Response.Flush();
0
All Courses

From novice to tech pro — start learning today.