Pop up window on LINKBUTTON click

Pamela Ng posted at 29-Jan-06 11:31
Hi

I have a link button and when clicked it should show a pop up window.

The problem is that the first time i click on the linkbutton, the pop up window does not show.  The pop up window only appears when i click on the linkbutton on the second time.  Why is this so?  At my linkbutton click event, i put the code:

Session("ProductName") = LinkButton1.Text
LinkButton1.Attributes.Add("onclick", "window.open('promo.aspx',null,'height=360, width=420,status= no, resizable= no, scrollbars=no, toolbar=no,location=no,menubar=no ');")

I tried the same method using hyperlink it works.  I only have to click the hyperlink ONCE then the pop up window would appear.  How should i do it for link button???  How should i change my code?


Click here to sign in and reply. You could earn money via our $500 contest just for being helpful.
  Pop up window on LINKBUTTON click - Pamela Ng  29-Jan-06 11:31 11:31:09 PM
      Put Code in PageLoad - F Cali  30-Jan-06 10:33 10:33:15 AM
          Pop up window - Pamela Ng  30-Jan-06 10:15 10:15:35 PM
              QueryString - F Cali  31-Jan-06 09:57 9:57:55 AM
                  Cannot show window pop up now - Pamela Ng  31-Jan-06 11:22 11:22:34 AM
View Posts