I'v been able to return a HashTable from a Web Service that I setup for a .Net 2.0, but the service fails to retun a DataTable in JSON. I keep getting the following error: 'A circular reference was detected while serializing an object'. Any tips?
[WebMethod(EnableSession = true) ]
public DataTable getSavedAddresses()
{
DataTable dt = new DataTable();
if (Session["ClientID"] != null)
{
int clientId = Convert.ToInt32(Session["ClientID"]);
dt = Address.GetClientShippingAddresses(clientId);
}
return dt;
}