<script runat="server"> <WebMethod()> _ Public Shared Function Sessions(ByVal key As String) As String Return DirectCast(HttpContext.Current.Session(key), String) End Function </script>
function pageLoad(sender, arg) { Language = PageMethods.Sessions("Lang", OnCallComplete, OnCallError); } function OnCallComplete(result, userContext, methodName) { alert(Language); } function OnCallError(error, userContext, methodName) { if (error !== null) { alert(error.get_message()); } }
WebMethod (EnableSession =true)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)