title: Gridview popup window not opening from RowCommand event corresponding to Linkbutton click
body: <p>I have Linkbutton in the Gridview TemplateField. 
  I want to Redirect to another Page in a popup Custom size window from RowCommand Event.</p>
  
  <p><strong>Note:</strong> Here I don't want to call OnClientScript property of LinkButton to openJavascript Popup Custom Size Window. I want to save Gridrow into Session object and open window from Serverside code only.</p>
  
  <p><strong>Here is the Code:</strong></p>
  
  <pre><code>&lt;ItemTemplate&gt;
      &lt;itemstyle width="5%" /&gt;
      &lt;asp:LinkButton CssClass="l_link" ID="lnkView" runat="server"  
        DataTextField="overWriteType" 
        CommandName="overWriteType"
        CommandArgument='&lt;%# Eval("overWriteType") %&gt;'
        Text='&lt;%# Eval("overWriteType") %&gt;'&gt;&lt;/asp:LinkButton&gt;
  &lt;/ItemTemplate&gt;
  </code></pre>
  
  <pre class="lang-cs prettyprint-override"><code>protected void gvKeys_RowCommand(object sender, GridViewCommandEventArgs e)
  {
      if (e.CommandName == "overWriteType")
      {
          System.Text.StringBuilder sb = new System.Text.StringBuilder();
          sb.Append("&amp;lt;script language='javascript'&gt;");
          sb.Append("window.open('OverwriteConfiguration.aspx', 'PopUp',");
          sb.Append("'top=0, left=0, width=500, height=500, menubar=no,toolbar=no,status,resizable=yes,addressbar=no');&lt;");
          sb.Append("/script&gt;");
          ScriptManager.RegisterStartupScript(Page, GetType(), "OpenWindow", sb.ToString(), true);
      }
  }
  </code></pre>
  
  <p>The above code is not opening any window.</p>