1- If you simply want to show the value present in the session in the html page in that case you can take one label like following.
<asp:Label ID="lblSessionText" runat="server"></asp:Label>
and at server side just assign the value from session to the label as following.
if (Session["MY_TEXT"] != null)
{
lblSessionText.Text = Session["MY_TEXT"];
}
2- If you don't want to show the session value in the html page but want to use it using client side script like javascript, in that case use one hidden field like following.
<asp:HiddenField ID="hidSessionText" runat="server" />
and assign the value to the hidden field like following.
if (Session["MY_TEXT"] != null)
{
hidSessionText.Value = Session["MY_TEXT"];
}
To access this in javascript you can use code like following.
<script language="javascript">
function GetValue()
{
var hidField = document.getElementById('<%=hidSessionText.ClientID %>');
alert(hidField.value);
}
</script>