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. close the popup window

close the popup window

Scheduled Pinned Locked Moved ASP.NET
csharptutorial
8 Posts 5 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.
  • S Offline
    S Offline
    saravanan05
    wrote on last edited by
    #1

    hi friends how to close the popup window from codebehind in .net regards saravan

    Known Is Drop.Unknown Is Ocean

    M S A 3 Replies Last reply
    0
    • S saravanan05

      hi friends how to close the popup window from codebehind in .net regards saravan

      Known Is Drop.Unknown Is Ocean

      M Offline
      M Offline
      M LN Rao
      wrote on last edited by
      #2

      Page.ClientScript.RegisterClientScriptBlock( this.GetType() ,"ClosePopupScript" ,"window.close()" ,true); From the popup window page's code-behind.

      Intelligence is measured by common sense not by how many scholarly books you read.

      S 1 Reply Last reply
      0
      • S saravanan05

        hi friends how to close the popup window from codebehind in .net regards saravan

        Known Is Drop.Unknown Is Ocean

        S Offline
        S Offline
        Sandeep Akhare
        wrote on last edited by
        #3

        i think not possible as the pop window will come at the client side. Server does not know anything about the pop up window you need to do it client side and write a javascript for that

        Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

        J 1 Reply Last reply
        0
        • M M LN Rao

          Page.ClientScript.RegisterClientScriptBlock( this.GetType() ,"ClosePopupScript" ,"window.close()" ,true); From the popup window page's code-behind.

          Intelligence is measured by common sense not by how many scholarly books you read.

          S Offline
          S Offline
          Sandeep Akhare
          wrote on last edited by
          #4

          But its the javascript only you are only registring it from server

          Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

          1 Reply Last reply
          0
          • S saravanan05

            hi friends how to close the popup window from codebehind in .net regards saravan

            Known Is Drop.Unknown Is Ocean

            A Offline
            A Offline
            Aavesh Agarwal
            wrote on last edited by
            #5

            U can write down the script in codebehind like Response.write(""); Response.write("window.close();"); Response.write(""); Check out this code.. Regards Avesh

            1 Reply Last reply
            0
            • S Sandeep Akhare

              i think not possible as the pop window will come at the client side. Server does not know anything about the pop up window you need to do it client side and write a javascript for that

              Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

              J Offline
              J Offline
              John ph
              wrote on last edited by
              #6

              I think It's possible. Even if it's a pop-up window the page will run at the server-side. At the server-side there are way's to build javascript dynamically in the CodeBehind using ClientScript.RegisterStartupScript, ClientScript.RegisterClientScriptInclude .

              Regards
               - J O N -


              S 1 Reply Last reply
              0
              • J John ph

                I think It's possible. Even if it's a pop-up window the page will run at the server-side. At the server-side there are way's to build javascript dynamically in the CodeBehind using ClientScript.RegisterStartupScript, ClientScript.RegisterClientScriptInclude .

                Regards
                 - J O N -


                S Offline
                S Offline
                Sandeep Akhare
                wrote on last edited by
                #7

                Yes i agree to some extent as we interpreted the quesition in differnt way . Just your post said that you can generate javascript dynamically yes very true but you can't close that pop up window from server side (code behind) as your script will run at client side you just registering it,not calling. It is going to execute at client side only

                Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

                J 1 Reply Last reply
                0
                • S Sandeep Akhare

                  Yes i agree to some extent as we interpreted the quesition in differnt way . Just your post said that you can generate javascript dynamically yes very true but you can't close that pop up window from server side (code behind) as your script will run at client side you just registering it,not calling. It is going to execute at client side only

                  Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

                  J Offline
                  J Offline
                  John ph
                  wrote on last edited by
                  #8

                  playing with bugs ) wrote:

                  but you can't close that pop up window from server side (code behind) as your script will run at client side you just registering it,not calling. It is going to execute at client side only

                  I interpreted your previous post in a different way. what you said here made it clear.

                  Regards
                   - J O N -


                  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