title: popup window not opening on button click in asp.net
body: <p>I have sample asp.net button for which i am writing click event and trying to open a new popupwindow , for some reason the popup window is not opening , please can i know whether the issue is related with browser or code </p>
  
  <p>Test.aspx</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;script language="javascript" type="text/javascript"&gt;
  
          function openNewWin(url) {
  
              var x = window.open(url, 'mynewwin', 'width=600,height=600,toolbar=1');
  
              x.focus();
  
          }
  
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div&gt;
       &lt;asp:Button ID="btnOpenPop" runat="server" Text="Open Pop"           
  
          onclick="btnOpenPop_Click" /&gt;
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Test.cs</p>
  
  <pre><code>public partial class Test : System.Web.UI.Page
      {
          protected void Page_Load(object sender, EventArgs e)
          {
  
  
          }
  
          protected void btnOpenPop_Click(object sender, EventArgs e)
          {
              string url = "http://www.dotnetcurry.com";
  
               ClientScript.RegisterStartupScript(this.GetType(), "OpenWin", "&lt;script&gt;openNewWin('" + url + "')&lt;/script&gt;");
  
  
  
  
          }
      }
  </code></pre>