when i m trying to call data from sql server to the treeview using webservice i getting the following error
Error during Serialization or deserialization using the JSON Javascript Serializer.The Length of the string exceeds the value set on the max JSONlength property.
this is my following code in webservice method
Error during Serialization or deserialization using the JSON Javascript Serializer.The Length of the string exceeds the value set on the max JSONlength property.
this is my following code in webservice method
private
DataTable GetProductCategories1(object categoryId)
{
SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["hakConnectionString"].ConnectionString);
SqlCommand selectCommand = new SqlCommand(@"Select * From Table911 where Left(Fld121,1) like '" + categoryId + "'" ,connection);
//selectCommand.Parameters.AddWithValue("parentId", categoryId);
SqlDataAdapter adapter = new SqlDataAdapter(selectCommand);
DataTable productCategories = new DataTable();
adapter.Fill(productCategories);
return productCategories;
}