Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Passing variable to a new browser window

Passing variable to a new browser window

Scheduled Pinned Locked Moved ASP.NET
questioncsharpjavascriptasp-nethelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Os Sutrisno
    wrote on last edited by
    #1

    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.

    M 1 Reply Last reply
    0
    • O Os Sutrisno

      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.

      M Offline
      M Offline
      minhpc_bk
      wrote on last edited by
      #2

      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 the opener object in the pop-up window to get reference to the parent window. If you use the showModalDialog method, you can pass the arguments as the method parameter and access the values in the new window via the dialogArguments property.

      A 1 Reply Last reply
      0
      • M minhpc_bk

        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 the opener object in the pop-up window to get reference to the parent window. If you use the showModalDialog method, you can pass the arguments as the method parameter and access the values in the new window via the dialogArguments property.

        A Offline
        A Offline
        AmbrishRaval
        wrote on last edited by
        #3

        u can build session and that session u can use globle. that session available on any page. Ambrish Raval

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups