How to write check of checkbox
to session
so you can use it on another page? Is it possible?
How to write check of checkbox
to session
so you can use it on another page? Is it possible?
Just complementing the answers there is another ASP property called "Application" and it basically has the same function as the "Session", that is, to save a value globally, but the difference between them is that "Session" is applied only one user and "Application" works for all users.
<%
Application("usuario")="João"
Application("idade")=50
Response.Write Application("usuario") & " - " & Application("idade")
%>
References: W3School Applications
MSDN Application and Sessions
In this link you can have all your session usage documentation with asp.
Here is a brief example:
<%
Session("usuario")="João"
Session("idade")=50
%>
I hope I have helped.
See the code below:
Default page
<body>
<form method="post" method="sessao.asp">
<input type="checkbox" name="ckb" value="1234"> Enviar o valor 1234 deste checkbox.<br>
<input type="submit" value="Enviar">
</form>
</body>
</html>
Sessao.asp page
<%
'Recebe o valor do checkbox e atribui a sessão.
session("ckb") = request.form("ckb")
response.write(session("ckb"))
%>