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? |
|