title: Javascript window.opener not working in asp.net mvc-5
body: <p>I am creating a web app in <code>asp.net mvc</code> in which I am redirecting from one view to another using window.open</p>
  
  <blockquote>
    <p>here is my code in javascript</p>
  </blockquote>
  
  <pre><code>window.open('@Url.Action("Details", "Details"), "_self");
  </code></pre>
  
  <p>I have some variable in JS which I declared in script Tag like the following</p>
  
  <pre><code>var1 = "0";
  var2 = "2";
  var3 = "0";
  var4 = "0";
  </code></pre>
  
  <p>but after redirecting I am not able to get the values of these variable</p>
  
  <p>when I type <code>console.log(window.parent.var2);</code></p>
  
  <p>I am expecting to get <code>2</code> but actually I am getting <code>undefined</code></p>
  
  <p>what I need to do, to use <code>Javascript's</code> window.opener in <code>asp.net mvc</code></p>