<script type="text/javascript"> function GetUserName() { var username = '<%= Session["UserName"] %>'; alert(username ); } </script>