My Base Class has the following method defined:
protected void RespondWithJson<T>(T graph)
{
var response = HttpContext.Current.Response;
ClearResponse();
response.ContentType = "text/json";
DataContractJsonSerializer ds = new DataContractJsonSerializer(typeof(T));
ds.WriteObject(response.OutputStream, graph);
response.End();
Sql_Disconnect();
}
The method belongs to all pages that will respond with JSON, depending on the query parameters in the URL.
The responses that I get from one of my pages makes no sense whatsoever, when you consider the source code involved.
The page is for submitting picks individually for our pick & pack operation. RespondWithJson is the only method that these pages will use to determine their response.
The only response the picksubmission page makes is of the type PickSubmissionResult
e.g.
RespondWithJson(new PickSubmissionResult() { message = "Some URL Parameters are missing from the call!" });
However, the response that I actually get from this page is of the type List<PickingRow>
A different page entirely on the server will make responses with List<PickingRow>
.
So why is another page's methods being invoked on this page??