Query:
On the server side, I set the value of
SessionData(EmployeeID) = "12345"
, which is first executed during page_load
.
Later, on the client side:
function getEmployeeId() {
return "<%# SessionData("EmployeeID")%>";
}
When I use the above code, I am receiving an empty string.
Furthermore, I attempted to use =
as
"<%= SessionData("EmployeeID")%>";
,
but encountered an error stating: "The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %=)."
Can someone provide me with a solution?