Webservice return string
Hi,I have datatable contains 5 columns and 10 rows. I want how to write asmx webservice to return a string.
Could anybody guide to me.
Thanks and regards
brite
public class empService : System.Web.Services.WebService
{
[WebMethod]
public String getEmp(int id)
{
//some logic
}
}
public partial class _Default : System.Web.UI.Page
{
protected void Button1_Click(object sender, EventArgs e)
{
localhost.empService obj=new localhost.empService();
String output=obj.getEmp(int.Parse(TextBox1.Text));
}
public string methodname()
{
return "Hi";
}