Solved

Open popup when clicking on a button

Posted on 2011-09-20
3
235 Views
Last Modified: 2012-05-12
Hello all!

I need to run this when clicking on an ASP.NET button:

javascript:window.open('mypage.aspx', 'UpdateInfo', 'scrollbars=no,resizable,status,toolbar=no,menubar =no');

I tried with response.write but is not working. How can I run the code above when a button is pressed? thanks!
0
Comment
Question by:pvg1975
3 Comments
 
LVL 16

Assisted Solution

by:Swapnil Piparia
Swapnil Piparia earned 250 total points
ID: 36567488
Hi pvg1975,

       If you are using .net 2.0 or onwards than, set the property "OnClientClick" of ASP.Net button to "javascript:window.open('mypage.aspx', 'UpdateInfo', 'scrollbars=no,resizable,status,toolbar=no,menubar =no');". It will solve your problem.

Thanks,
netswap
0
 
LVL 9

Accepted Solution

by:
jkofte earned 250 total points
ID: 36567530
onClientClick="window.open('mypage.aspx', 'UpdateInfo', 'scrollbars=no,resizable,status,toolbar=no,menubar =no'); return false;" 

Open in new window


(if you add return false, your code will not postback)

0
 

Author Closing Comment

by:pvg1975
ID: 36567552
Thank you both guys, I used part of both solutions so I split the points to be fair :)

Paula
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question