?
Solved

Opening popup from ascx page

Posted on 2007-11-20
1
Medium Priority
?
1,995 Views
Last Modified: 2008-02-05
I need to be able to open a popup window after the user clicks a button on an ascx page. This button needs to get different values from drop down lists and text boxes, create a URL, and open this url on a popup window.

Is there a way to accomplish this?

0
Comment
Question by:jjexpert1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
bcaff86 earned 750 total points
ID: 20321654
You can use the "OnClientClick" property of the button.  Set the value to a javascript window.open call.

It would look something like this in C#.

myButton.OnClientClick = "window.open('" + myDropDown.SelectedValue + myText.Text +"')";

Check here for different ways to format your pop up using window.open:

http://www.javascript-coder.com/window-popup/javascript-window-open.phtml

0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

762 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