Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 06, 2012 07:28 PM by davrob01
Dec 05, 2007 06:10 PM|LINK
VWD 2005 Express. Visual Basic. How may I create a "pop up" window (with it own controls for closing the window) and call it (open it) from the code behind? Thanks for the help.
Dec 05, 2007 06:57 PM|LINK
this site will make the js you need for a popup window :
this is what i use all the time :
then i just pass it the href (url), width, height, and if we want scroll bars or not.
to call it from a link you would use
<a href="MyDestinationPage.aspx" onClick="genericPopup(this.href,300,300,no)">Click for popup</a>
Dec 05, 2007 07:13 PM|LINK
Dec 05, 2007 07:19 PM|LINK
Create a form call it WebForm2.aspx, on WebForm1.aspx add a button with id Button1. onpage_load event use the below code
Dec 05, 2007 07:22 PM|LINK
Thanks Haissam. You have been of much help to me today. I will give your "popup" suggestion a try.
Dec 05, 2007 07:24 PM|LINK
Dec 05, 2007 07:27 PM|LINK
Dec 05, 2007 07:42 PM|LINK
Dec 05, 2007 09:23 PM|LINK
Suppose that I want to pass some text content to the WebForm2.aspx file that is opened by your example. How would I pass this text information? What I am trying to do is display a particular message (which will come from a database and hence is not fixed)
in the pop up window. Thanks for your continued help.
Dec 05, 2007 10:07 PM|LINK
You can save the string in a session variable which can be read in webform2 to be displayed. Take a look into the below example.
// WebForm1 page_load event
Session["Test"] = "Hello World";
// WebForm2.aspx page_load event