I have two webmethod i have used session variable to exchange the username variable between two webmethods but its displaying null in second webmethod ,can we use cookie as alternate to session to store and retrieve username
[WebMethod(EnableSession = true)] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public bool SubmitList1(string username ) { Session["User_Name"] = username; ......... .......
}
[WebMethod(EnableSession = true)] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public bool addresslisting( string keyword) {
string username = Context.Session["User_Name"].ToString();
........
.........
}