Is there a way to access the current session from within the replacement control?

It seems that the context parameter of the asp: net lookup control method is missing in the current session when the page is cached.

Besides getting the contents of the substitution control via ajax or using some other method of storing data that would otherwise be in the session (like databases), is there anything else I can do?

Is there a workaround to use my own asp.net session in substitution management?

<asp:Substitution  ID="myid" MethodName="method1"></asp:Substitution>

public static string method1(HttpContext context) <--  [1]

[1] --- conext.session is null after page caching

+3
source share
2 answers

.

re: Tip/Trick: " " ASP.NET 2.0

, 23 2007 . 1:30 ScottGu

,

, , , , .

, , - ( ).

!

+1

, , context.Session null ? , Substitution, Context.Session , . , .

ScottGu, .

HttpContext , ASP.NET, Response, User, Server, Session, Application, ...

Tip/Trick: " " ASP.NET 2.0

0

Source: https://habr.com/ru/post/1722536/


All Articles