Note that there are some explanatory texts on larger screens.

plurals
  1. POPass Session Variable to another page Javascript
    primarykey
    data
    text
    <p>I guys, I'm creating a VB.NET application, and this is the first time that I used Session Variables.</p> <p>What I want to do is to pass the session variable from a page (<strong>first.aspx</strong>) to another page (<strong>second.aspx</strong>) via url.</p> <p>Here an example of what I want to do:</p> <p>In the <strong>first.aspx.vb</strong> page I declare a session variable and assign to it a value</p> <pre><code>Session("example") = "example123" </code></pre> <p>Then I pass this Session Variable to the <strong>first.aspx</strong> page </p> <pre><code>Response.Write(Session("example")) </code></pre> <p>and via javascript read the value of the Variable</p> <pre><code>&lt;script type= text/javascript&gt; var SessionVar = '&lt;%=Session("example")%&gt;)'; &lt;/script&gt; </code></pre> <p>Now, what I want to do is to change the value of the Variable (for example setting it as <code>example456</code>), and then pass the variable to the <strong>second.aspx</strong> [for example with <code>window.open()</code>] so that the url not contains the value of the variable but its name:</p> <p><code>url/second.aspx?value=example</code> <strong>AND NOT</strong> <code>url/second.aspx?value=example456</code></p> <p>Infact I don't want that the user read the value of the variable.</p> <p>Finally I have to read the value of the session variable in the <strong>second.aspx.vb</strong> via <code>Request.QueryString("value")</code> and do the various operations.</p> <p>Is it possible ? </p> <p>If not, there is anothe way to do this</p> <p>Thanks for the help :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload