[WebMethod] public static string SetSession(string name) { HttpContext.Current.Session["Name"] = name; return "Hello " + HttpContext.Current.Session["Name"] + Environment.NewLine + "The Current Time is: " + DateTime.Now.ToString(); }