title: How to avoid UrlReferrer error in asp .net when page called using javascript window.open
body: <p>I have two aspx pages with names List.aspx &amp; View.aspx .</p>
  
  <p>In view.apsx am using Request.UrlReferrer property (For some security purpose)</p>
  
  <pre><code>View.aspx
  Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
  
      If Request.UrlReferrer Is Nothing Then
          Response.Write("Invalid URL")
      Else
        // Some Code here
      End
  
  End Sub
  </code></pre>
  
  <p>In List.aspx page call one java script function such as:</p>
  
  <pre><code>List.aspx 
      function ViewDetail(HCode)
      {
              var url = "View.aspx?ActivePageName=V&amp;HeaderCode=" + HCode;
                  var z = window.open(url, "Action", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=0,border=thin,top=400,left=400,width=500,height=200");
      }
  </code></pre>
  
  <p>In new opened pop up window, I got the UrlReferrer is error.</p>