Passing variable to a new browser window
-
Hi all, need some help here. I've been cracking my skull but I'm new at asp.net. I have a web form for polling (Form1) with radio buttons and a button control. When the user selects an option from the radiobuttons and clicks the button, my desired effect is to open up a new window (Form2) and pass the radiobutton.selecteditem property to the new window. How can I achieve this? I can open a new window by setting the postbackurl property of the button to javascript:var win=window.open("form2.aspx") but I'm not sure how to pass the variable.
-
Hi all, need some help here. I've been cracking my skull but I'm new at asp.net. I have a web form for polling (Form1) with radio buttons and a button control. When the user selects an option from the radiobuttons and clicks the button, my desired effect is to open up a new window (Form2) and pass the radiobutton.selecteditem property to the new window. How can I achieve this? I can open a new window by setting the postbackurl property of the button to javascript:var win=window.open("form2.aspx") but I'm not sure how to pass the variable.
If you use the
open
method to pop up a new window, you then can pass the parameters in the query string of the URL to the destination page. You can also use theopener
object in the pop-up window to get reference to the parent window. If you use theshowModalDialog
method, you can pass the arguments as the method parameter and access the values in the new window via thedialogArguments
property. -
If you use the
open
method to pop up a new window, you then can pass the parameters in the query string of the URL to the destination page. You can also use theopener
object in the pop-up window to get reference to the parent window. If you use theshowModalDialog
method, you can pass the arguments as the method parameter and access the values in the new window via thedialogArguments
property.u can build session and that session u can use globle. that session available on any page. Ambrish Raval