Open Popup Window via VB Code

  • Thread starter Thread starter Lou Civitella
  • Start date Start date
L

Lou Civitella

I have an asp:Button on my page. The buttons OnClick event runs some code. I
would like to have it also open a popup window.
Is this possible and how do I go about doing this?

Thanks,
Lou
 
a "Popup Window" is done client side with script, via window.open method.
There are dozens of javascript and HTML DOM references online where you can
find sample code. Would not, however, recommend you do this with VBScript -
use javascript instead.
Peter
 
You can attach a javascript function to your button

button.attributes.add("onclick", "window.open(...)")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top