title: how use PopupControlExtender with conditions
body: <p>i have an <code>asp.net Button</code>, i want when a user click on that button:</p>
  
  <ol>
  <li><p>if there is any Session["id"] for that user, user will be redirect to
  another page </p>
  
  <p>2.if not show a PopupControlExtender and show some link
  to user</p>
  
  <p>we cant use PopupControlExtender in code behind how i should check this condition ?</p></li>
  </ol>
  
  <p>thx</p>
  
  <pre><code>  &lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
          &lt;ContentTemplate&gt;
           &lt;asp:Button ID="Button1" runat="server" Text="Button" /&gt;
                     &lt;br /&gt;
          &lt;br /&gt;
          &lt;asp:Panel ID="Panel1" runat="server" BackColor="#9933FF" BorderColor="#6666FF" 
              Height="132px" Width="329px"&gt;
              &lt;asp:Button ID="Button2" runat="server" Text="Button" /&gt;
              &lt;br /&gt;
              &lt;asp:Label ID="Label1" runat="server" Text="Label"&gt;&lt;/asp:Label&gt;
          &lt;/asp:Panel&gt;
  
          &lt;asp:PopupControlExtender ID="PopupControlExtender1" runat="server" 
                  TargetControlID="Button1" PopupControlID="Panel1" 
                 &gt;
          &lt;/asp:PopupControlExtender&gt;
          &lt;/ContentTemplate&gt;
          &lt;/asp:UpdatePanel&gt;
  </code></pre>