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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. open window

open window

Scheduled Pinned Locked Moved ASP.NET
help
5 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.
  • P Offline
    P Offline
    ptvce
    wrote on last edited by
    #1

    i have a buuton, and i want with click it open a new window and send a value to that form i wrote: response.rediret(url) but it open that window i want open a new window, plz help

    R 1 Reply Last reply
    0
    • P ptvce

      i have a buuton, and i want with click it open a new window and send a value to that form i wrote: response.rediret(url) but it open that window i want open a new window, plz help

      R Offline
      R Offline
      r a m e s h
      wrote on last edited by
      #2

      Use window.open("yourpage.aspx") in the onClick event(javascript event) of the button. For server side click event,

      Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "openWindow", "window.open('DemoPage1.aspx')", true);

      P 1 Reply Last reply
      0
      • R r a m e s h

        Use window.open("yourpage.aspx") in the onClick event(javascript event) of the button. For server side click event,

        Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "openWindow", "window.open('DemoPage1.aspx')", true);

        P Offline
        P Offline
        ptvce
        wrote on last edited by
        #3

        thanks, but i want give a url for window.open not the name of form and i want send a querystring. what should i do? give me a code that doing this work: this.Page.Response.Redirect(url + "?queryString=" + strSelect);

        R K 2 Replies Last reply
        0
        • P ptvce

          thanks, but i want give a url for window.open not the name of form and i want send a querystring. what should i do? give me a code that doing this work: this.Page.Response.Redirect(url + "?queryString=" + strSelect);

          R Offline
          R Offline
          r a m e s h
          wrote on last edited by
          #4

          Try this.

          String stringURL = url + "?queryString=" + strSelect;
          Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "openWindow", "window.open('" + stringURL + "')", true);

          Here I assume that you have two string variables url and strSelect;

          1 Reply Last reply
          0
          • P ptvce

            thanks, but i want give a url for window.open not the name of form and i want send a querystring. what should i do? give me a code that doing this work: this.Page.Response.Redirect(url + "?queryString=" + strSelect);

            K Offline
            K Offline
            K0306
            wrote on last edited by
            #5

            Try this javascript function

            <script type="text/javascript">
            function myfunction(str1)
            {
            window.location.href='Default2.aspx?id='+str1;
            }
            </script>

            Regards, Karthik K...

            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