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. Response.Redirect(url, bool)

Response.Redirect(url, bool)

Scheduled Pinned Locked Moved ASP.NET
question
3 Posts 2 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.
  • T Offline
    T Offline
    Tamimi Code
    wrote on last edited by
    #1

    hi the second parameter suppose to: Indicates whether execution of the current page should terminate. but what does this mean ?? where i have to realty use the second parameter ?? thank you

    When you get mad...THINK twice that the only advice Tamimi - Code

    B 1 Reply Last reply
    0
    • T Tamimi Code

      hi the second parameter suppose to: Indicates whether execution of the current page should terminate. but what does this mean ?? where i have to realty use the second parameter ?? thank you

      When you get mad...THINK twice that the only advice Tamimi - Code

      B Offline
      B Offline
      Brij
      wrote on last edited by
      #2

      Tamimi - Code wrote:

      Indicates whether execution of the current page should terminate.

      When we use Response.Redirect, it tries to end the current request and start a new request.The second parameter is endResponse, when it is set to true, it calls Response.End method, which throws an exception when it gets completed. This is bydefault behaviour of this method.This method is provided only for compatibility with ASP. So it is recommended to set it false, to avoid the exception because it is not good for the website performance. If you still want to set it true. Then you should firts call CompleteRequest() method. It will avoid calling end method.

      Cheers!! Brij My Blog:http://brijbhushan.wordpress.com
      Check my latest Article :ViewState - Various ways to reduce performance overhead

      T 1 Reply Last reply
      0
      • B Brij

        Tamimi - Code wrote:

        Indicates whether execution of the current page should terminate.

        When we use Response.Redirect, it tries to end the current request and start a new request.The second parameter is endResponse, when it is set to true, it calls Response.End method, which throws an exception when it gets completed. This is bydefault behaviour of this method.This method is provided only for compatibility with ASP. So it is recommended to set it false, to avoid the exception because it is not good for the website performance. If you still want to set it true. Then you should firts call CompleteRequest() method. It will avoid calling end method.

        Cheers!! Brij My Blog:http://brijbhushan.wordpress.com
        Check my latest Article :ViewState - Various ways to reduce performance overhead

        T Offline
        T Offline
        Tamimi Code
        wrote on last edited by
        #3

        :)

        When you get mad...THINK twice that the only advice Tamimi - Code

        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