var FirstName = '<%=
Session["UserID"] %>'
In
above code Session["UserID"] is the value what
we set in session. If you want to see it in complete example check below code
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript">
$(function() {
var FirstName = '<%= Session["UserID"] %>'
$('#lbltxtFirstName').text(FirstName)
});
</script>
</head>
<body>
<label id="lbltxtFirstName" />
</body>
</html>
No comments:
Post a Comment