write or read to session using Jquery --error
I am trying to write/read from session using jquery,
but I am getting the error
"0x800a138f - JavaScript runtime error: Unable to get property 'set' of undefined or null reference"
Please help me resolve this error ?
I am pasting my page source below
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title> </title></head> <body> <form method="post" action="WebForm1.aspx" id="form1"> <div class="aspNetHidden"> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE2MTY2ODcyMjlkZKyCMgqniM/aldukh4YFosrxeF/cGpC1q4aFWjLdll/R" /> </div> <div> <input id="butSet" type="button" value="SET" /> <input id="butGet" type="button" value="GET" /> </div> </form> </body> </html> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.js" type="text/javascript"></script> <script type="text/javascript"> $(document).ready(function () { $('#butSet').click(function () { $.session.set('time', new Date()); }); $('#butGet').click(function () { alert($.session.get('time')); }); }); </script>