I need to perform a JavaScript operation using data stored in the session (
System.Web.HttpContext.Current.Session["Filtre"]
)
Is it feasible to access and process data in JavaScript from the ASP.NET session?
I attempted to use the following code sample, but it did not work as expected:
var filter = '<%=Session["Filtre"]%>';
If accessing the data directly is not secure or possible, can I call an aspx.cs function from JavaScript to perform the required operation?
Thank you and have a wonderful day.