By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,564 Members | 810 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,564 IT Pros & Developers. It's quick & easy.

Open Window after ONE click (only one)

P: 42
Why only one?

Well, what has been happen to me is that the window just pop up after the second click and i dont know why this is happening.

The code inside the link button is:

Expand|Select|Wrap|Line Numbers
  1.  protected void CicloCamLink_Click(object sender, EventArgs e)
  2. {
  3. string openWindow = @"window.open('CicloCamarasWindow.aspx','anycontent','width=455,height=435,resizable=1')";
  4.  
  5. CicloCamLink.Attributes.Add("onclick", openWindow);
  6. }
Someone knows why this is happening?

Thanks in advance.
Jun 3 '08 #1
Share this Question
Share on Google+
2 Replies


shweta123
Expert 100+
P: 692
Hi,

This is happening because you have written the code in "CicloCamLink_Click" procedure. You should write the Openwindow code Page_Load() procedure.

Why only one?

Well, what has been happen to me is that the window just pop up after the second click and i dont know why this is happening.

The code inside the link button is:

Expand|Select|Wrap|Line Numbers
  1.  protected void CicloCamLink_Click(object sender, EventArgs e)
  2. {
  3. string openWindow = @"window.open('CicloCamarasWindow.aspx','anycontent','width=455,height=435,resizable=1')";
  4.  
  5. CicloCamLink.Attributes.Add("onclick", openWindow);
  6. }
Someone knows why this is happening?

Thanks in advance.
Jun 3 '08 #2

P: 42
Thanks for the help []
Jun 3 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.