現在、私はセッションを使用してデータを取得し、私はsession
を使用せずにGET_DATA()メソッドの下文字列応答にhandler_responseデータを取得したいです。
私のコードは
[WebMethod]
public static string GET_DATA()
{
string Search = "1";
master_handler(Search);
string response = string.Empty;
response = (string)HttpContext.Current.Session["HANDLER_RESPONSE"]; // getting handler_response here
HttpContext.Current.Session["obj_GET_FLIGHT_DATA"] = response;
return response;
}
public static string master_handler(string dt)
{
string handler_response= string.Empty;
LibraryCaller.Master_Handler MH = new LibraryCaller.Master_Handler();
string get_api_data = MH.Search(dt);
JObject jObj = JObject.Parse(get_api_data);
handler_response= jObj.ToString();
HttpContext.Current.Session["HANDLER_RESPONSE"] = handler_response; // here currently using sesson
return handler_response;
}
あなたは値をキャッシュし、そこ –