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. [Message Deleted]

[Message Deleted]

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

    [Message Deleted]

    C G P D 5 Replies Last reply
    0
    • P Pawan Kiran

      [Message Deleted]

      G Offline
      G Offline
      Greg Chelstowski
      wrote on last edited by
      #2

      With an tag.

      var question = (_2b || !(_2b));

      1 Reply Last reply
      0
      • P Pawan Kiran

        [Message Deleted]

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #3

        These do not close a page. window.close() will, with a prompt for the user ( this is javascript, obviously ). I would hope it goes without saying that no codebehind will close the browser.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        1 Reply Last reply
        0
        • P Pawan Kiran

          [Message Deleted]

          P Offline
          P Offline
          Praveen Nair NinethSense
          wrote on last edited by
          #4

          Not sure what you meant by "close" 1. You can close the window by using javascript - window.close() 2. It is not possible to close from ASP.NET

          PraVeeN blog.ninethsense.com/

          1 Reply Last reply
          0
          • P Pawan Kiran

            [Message Deleted]

            D Offline
            D Offline
            David Mujica
            wrote on last edited by
            #5

            Try this in your button_click event:

            Response.Write("<script type='text/javascript'>window.close();</script>")

            What is happening is that you are sending a small javascript directly to the browser and it is telling the browser to close the active window. It works for me. ;)

            C P 2 Replies Last reply
            0
            • D David Mujica

              Try this in your button_click event:

              Response.Write("<script type='text/javascript'>window.close();</script>")

              What is happening is that you are sending a small javascript directly to the browser and it is telling the browser to close the active window. It works for me. ;)

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              Wouldn't it make more sense to write a client click event and do it in js, unless you have other code you want to run first ?

              Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

              D 1 Reply Last reply
              0
              • D David Mujica

                Try this in your button_click event:

                Response.Write("<script type='text/javascript'>window.close();</script>")

                What is happening is that you are sending a small javascript directly to the browser and it is telling the browser to close the active window. It works for me. ;)

                P Offline
                P Offline
                Pawan Kiran
                wrote on last edited by
                #7

                [Message Deleted]

                C 1 Reply Last reply
                0
                • P Pawan Kiran

                  [Message Deleted]

                  C Offline
                  C Offline
                  Christian Graus
                  wrote on last edited by
                  #8

                  It means you have no idea what you're doing and should stop programming until you've read a basic book or two. It closes a winforms app, it obviously does not have any use in ASP.NET ( well, obvious if you know the first thing about ASP.NET )

                  Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                  1 Reply Last reply
                  0
                  • C Christian Graus

                    Wouldn't it make more sense to write a client click event and do it in js, unless you have other code you want to run first ?

                    Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                    D Offline
                    D Offline
                    David Mujica
                    wrote on last edited by
                    #9

                    I'm just showing that there is more than one way to skin a cat.

                    C 1 Reply Last reply
                    0
                    • D David Mujica

                      I'm just showing that there is more than one way to skin a cat.

                      C Offline
                      C Offline
                      Christian Graus
                      wrote on last edited by
                      #10

                      Fair enough. I get the impression he doesn't know which end of the cat is which, metaphorically speaking, tho.

                      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                      1 Reply Last reply
                      0
                      • P Pawan Kiran

                        [Message Deleted]

                        C Offline
                        C Offline
                        Christian Graus
                        wrote on last edited by
                        #11

                        Deleting your messages is kind of rude and disrespectful. Your question was answered, what if someone else wanted to read the question and the answers ?

                        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                        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