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. Redirect's strange behaviour

Redirect's strange behaviour

Scheduled Pinned Locked Moved ASP.NET
debugging
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.
  • N Offline
    N Offline
    Nimua
    wrote on last edited by
    #1

    Hello! I use Response.Redirect(url,true) for return to the same page in edit mode, after creation of object. But for some reason it doesn't work correctly :sigh: After Response.Redirect(url,true) fulfills in PageLoad in debug mode it doesn't get in (!IsPostBack) section : (( .. Thank you.

    E 1 Reply Last reply
    0
    • N Nimua

      Hello! I use Response.Redirect(url,true) for return to the same page in edit mode, after creation of object. But for some reason it doesn't work correctly :sigh: After Response.Redirect(url,true) fulfills in PageLoad in debug mode it doesn't get in (!IsPostBack) section : (( .. Thank you.

      E Offline
      E Offline
      eyeseetee
      wrote on last edited by
      #2

      Nimua wrote:

      it doesn't get in (!IsPostBack) section : (( ..

      what do you mean by that? A response.redirect isnt a postback

      The answers posted by me are suggestions only and cannot be used in anyway against me.

      N 1 Reply Last reply
      0
      • E eyeseetee

        Nimua wrote:

        it doesn't get in (!IsPostBack) section : (( ..

        what do you mean by that? A response.redirect isnt a postback

        The answers posted by me are suggestions only and cannot be used in anyway against me.

        N Offline
        N Offline
        Nimua
        wrote on last edited by
        #3

        I know that it is not a postback, and It is usually get into section if (not is postback) in pageload, where it calls DataBind. In my opinion this is normal for Response.Redirect. And in my case Response.Redirect("url",true); then in debugg mode I have a breakpoint in PageLoad

        if (!IsPostBack)
        {
        Page.DataBind();
        }
        else
        {
        //else section
        }

        it goes to the "else section" ... and i don't understand why :(

        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