Webservice method does not return a value
Hi,In my web service method does not return values in the browser its shows the error
in the browser like An Error occurred while processing output information.
My webservice method as below:
public string GetItemCategory(string strDate)
{
DataSet ds = new DataSet();
string strDetails = "";
if (ds.Tables[0].Rows.Count > 0)
{
strDetails += "[";
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
strDetails += "{\"Field1\":\"" + ds.Tables[0].Rows[i]["ID"].ToString() + "\", \"Field2\":\"" + ds.Tables[0].Rows[i]["CategoryName"].ToString() + "\",\"Field3\":\"" + ds.Tables[0].Rows[i]["Active"].ToString() + "\",\"Field4\":\"" + ds.Tables[0].Rows[i]["Categorycode"].ToString() + "\"},";
}
strDetails += "]";
strDetails = strDetails.Replace(",]", "]");
}
return strDetails;
}
What's wrong in my webservice code i want to return the data from dataset to string.
Could any body help me.
Thank and Regards
brite