hello to all,
can anyone help me? I want to cache my pages based on VeryByParam=userid. The value for userid comes from a Session.
The problem is almost all the pages in the application should be cached by userid and i don't want to recode all of them just to pass parameters like
Response.Redirect("../Menu.aspx?userid=" & Session("userid")).
Is there anyway that i could add immediately the value to the directive? example,
<%@ OutputCache Duration="2700" VaryByParam="Session('userid')" %>
but i already tried this one and it won't work.
or how do i use the value coming from a hidden field. I also tried this one:
<%@ OutputCache Duration="2700" VaryByParam="userid" %>
...
...
..
..
<FORM>....
<input id=userid type=hidden value=<%=Session("userid")%>
</FORM>
but even if a different user already log, same page as the first user would be displayed.
Sorry if my explanation is not clear enough but i hope atleast you understand what I meant...
hope to hear from you... anyone
thanks.
can anyone help me? I want to cache my pages based on VeryByParam=userid. The value for userid comes from a Session.
The problem is almost all the pages in the application should be cached by userid and i don't want to recode all of them just to pass parameters like
Response.Redirect("../Menu.aspx?userid=" & Session("userid")).
Is there anyway that i could add immediately the value to the directive? example,
<%@ OutputCache Duration="2700" VaryByParam="Session('userid')" %>
but i already tried this one and it won't work.
or how do i use the value coming from a hidden field. I also tried this one:
<%@ OutputCache Duration="2700" VaryByParam="userid" %>
...
...
..
..
<FORM>....
<input id=userid type=hidden value=<%=Session("userid")%>
</FORM>
but even if a different user already log, same page as the first user would be displayed.
Sorry if my explanation is not clear enough but i hope atleast you understand what I meant...
hope to hear from you... anyone
thanks.