Solved

Open popup when clicking on a button

Posted on 2011-09-20
3
234 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
crm development 2 68
Binding a check box in an Asp.net DataGrid 4 40
dynamic menu in asp.net c# 11 60
rebind a grid after user clicks on node in treeview 1 15
Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
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 …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now