[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2011
  • Last Modified:

Opening popup from ascx page

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
jjexpert1
Asked:
jjexpert1
1 Solution
 
bcaff86Commented:
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now