i am writing a web method to return an html file to android client here is the code i have tried
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
public class Service1 : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld()
{
string file = Server.MapPath("index.html");
return file;
}
}
and defiantly its not working, i am not sure about the return type of the method, which to choose. do i need to convert that html file to string and then return it to client?