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. Close any Specific page

Close any Specific page

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nettoolshelpquestion
3 Posts 3 Posters 1 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
    Pankaj18
    wrote on last edited by
    #1

    Hi, I am using this code 'Response.Write("<script>window.close()</script>;");' to close current form in Asp.net . but if i want to close any specific form as "employee.aspx" then what is the code of it. please help me Thanks ! Pankaj Singh

    A A 2 Replies Last reply
    0
    • P Pankaj18

      Hi, I am using this code 'Response.Write("<script>window.close()</script>;");' to close current form in Asp.net . but if i want to close any specific form as "employee.aspx" then what is the code of it. please help me Thanks ! Pankaj Singh

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      if your page is not opened then what is the use of closing it. You are using any Popup window? or want to close the browser itself ? :doh:

      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

      1 Reply Last reply
      0
      • P Pankaj18

        Hi, I am using this code 'Response.Write("<script>window.close()</script>;");' to close current form in Asp.net . but if i want to close any specific form as "employee.aspx" then what is the code of it. please help me Thanks ! Pankaj Singh

        A Offline
        A Offline
        Abhishek Sur
        wrote on last edited by
        #3

        if this is in a new window then use Window.close() If you are navigating to a page, just navigate to your login page rather than closing the whole browser through your code. Other than this, you can use self.close(); to close itself. You must run this from within employee.aspx.

        Abhishek Sur


        My Latest Articles **Create CLR objects in SQL Server 2005 C# Uncommon Keywords Read/Write Excel using OleDB

        **Don't forget to click "Good Answer" if you like to.

        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