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. General Programming
  3. C#
  4. Browser Close

Browser Close

Scheduled Pinned Locked Moved C#
tutorialquestion
13 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.
  • A Offline
    A Offline
    Agweet
    wrote on last edited by
    #1

    Hi All...Can any1 tell me how to close my IE with a click event? Thanks in advance

    living life on the flip side

    P F 2 Replies Last reply
    0
    • A Agweet

      Hi All...Can any1 tell me how to close my IE with a click event? Thanks in advance

      living life on the flip side

      P Offline
      P Offline
      Paw Jershauge
      wrote on last edited by
      #2

      Click on the red X in the upper right corner, hehehe ;P

      With greate code, comes greate complexity, so keep it simple stupid...:-\ :-\

      A 1 Reply Last reply
      0
      • A Agweet

        Hi Paw...thanks for the intelligent advice...it was genius to figure that out...

        living life on the flip side

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

        :laugh:

        living life on the flip side

        1 Reply Last reply
        0
        • P Paw Jershauge

          Click on the red X in the upper right corner, hehehe ;P

          With greate code, comes greate complexity, so keep it simple stupid...:-\ :-\

          A Offline
          A Offline
          Agweet
          wrote on last edited by
          #4

          Hi Paw...thanks for the intelligent advice...it was genius to figure that out...

          living life on the flip side

          A 1 Reply Last reply
          0
          • A Agweet

            Hi All...Can any1 tell me how to close my IE with a click event? Thanks in advance

            living life on the flip side

            F Offline
            F Offline
            franz pilgerstorfer
            wrote on last edited by
            #5

            Use the click-Event handler of your ?button? and add the following lines of code

            // Event-Handler
            Response.Write("window.close();");

            hope this helps Franz

            A 1 Reply Last reply
            0
            • F franz pilgerstorfer

              Use the click-Event handler of your ?button? and add the following lines of code

              // Event-Handler
              Response.Write("window.close();");

              hope this helps Franz

              A Offline
              A Offline
              Agweet
              wrote on last edited by
              #6

              Hi Franz, wen i use the code then i get the following error: Error parsing near '<div class="ForumSig">living life on the flip side</div>

              F P 2 Replies Last reply
              0
              • A Agweet

                Hi Franz, wen i use the code then i get the following error: Error parsing near '<div class="ForumSig">living life on the flip side</div>

                F Offline
                F Offline
                franz pilgerstorfer
                wrote on last edited by
                #7

                don't use " - use ' instead if this doesn't help - post the complete event-handler and I will have a look on it franz

                A 1 Reply Last reply
                0
                • A Agweet

                  Hi Franz, wen i use the code then i get the following error: Error parsing near '<div class="ForumSig">living life on the flip side</div>

                  P Offline
                  P Offline
                  Paw Jershauge
                  wrote on last edited by
                  #8

                  Try this then...

                  // Event-Handler
                  Response.Write("<script language=\"javascript\">window.close();</script>");

                  Remember the \" to make quotes inside an text string... ;)

                  With greate code, comes greate complexity, so keep it simple stupid...:-\ :-\

                  A 1 Reply Last reply
                  0
                  • F franz pilgerstorfer

                    don't use " - use ' instead if this doesn't help - post the complete event-handler and I will have a look on it franz

                    A Offline
                    A Offline
                    Agweet
                    wrote on last edited by
                    #9

                    Hi Franz...this is the error i got: Sys.WebForms.PageRequestManagerParserErrorException: The message recieved from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled Details: Error parsing near '&lt;script language='ja'

                    living life on the flip side

                    1 Reply Last reply
                    0
                    • P Paw Jershauge

                      Try this then...

                      // Event-Handler
                      Response.Write("<script language=\"javascript\">window.close();</script>");

                      Remember the \" to make quotes inside an text string... ;)

                      With greate code, comes greate complexity, so keep it simple stupid...:-\ :-\

                      A Offline
                      A Offline
                      Agweet
                      wrote on last edited by
                      #10

                      Hi Paw...thanks but no luck...it still breaks...my above msg has the full error

                      living life on the flip side

                      L A 2 Replies Last reply
                      0
                      • A Agweet

                        Hi Paw...thanks but no luck...it still breaks...my above msg has the full error

                        living life on the flip side

                        L Offline
                        L Offline
                        leppie
                        wrote on last edited by
                        #11

                        The system complains because you are doing something very insecure. I think you can turn this off with PageValidation or something, but rather find another way. I suggest you try that in the Web or ASP.NET forum.

                        xacc.ide - now with TabsToSpaces support
                        IronScheme - 1.0 alpha 4a out now (29 May 2008)

                        1 Reply Last reply
                        0
                        • A Agweet

                          Hi Paw...thanks but no luck...it still breaks...my above msg has the full error

                          living life on the flip side

                          A Offline
                          A Offline
                          ashok techxygen
                          wrote on last edited by
                          #12

                          hi , use this in ur aspx page

                          Ashok

                          A 1 Reply Last reply
                          0
                          • A ashok techxygen

                            hi , use this in ur aspx page

                            Ashok

                            A Offline
                            A Offline
                            Agweet
                            wrote on last edited by
                            #13

                            Hi ashok...sorry but the event needs to be code behind...its a MenuItem event

                            living life on the flip side

                            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