How to write content in a session in classic asp and move to an mvc page?

1

How to write check of checkbox to session so you can use it on another page? Is it possible?

    
asked by anonymous 01.03.2016 / 18:33

3 answers

2

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

    
01.03.2016 / 19:00
2

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.

    
01.03.2016 / 18:49
2

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"))
%>
    
01.03.2016 / 18:55