Is a Response.Redirect to the same page a Postback?

Discussion in 'ASP .Net' started by Bruce W..1, Dec 10, 2003.

  1. Bruce W..1

    Bruce W..1 Guest

    Is it a Postback if you do a Response.Redirect to the same page?

    Thanks for your help.
     
    Bruce W..1, Dec 10, 2003
    #1
    1. Advertising

  2. No.

    --
    Sincerely,

    S. Justin Gengo, MCP
    Web Developer / Programmer

    Free code library at:
    www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzche


    "Bruce W..1" <> wrote in message
    news:...
    > Is it a Postback if you do a Response.Redirect to the same page?
    >
    > Thanks for your help.
     
    S. Justin Gengo, Dec 10, 2003
    #2
    1. Advertising

  3. Bruce W..1

    alex bowers Guest

    hi,
    response.redirect to the same page acts as if the client
    has generated a fresh request to that page, so any server-
    side code that is on the page will run again.
    however, if you check the Page.isPostBack() property
    after a response.redirect, it will return false because
    the page isn't actually posting back to itself.

    Hope this makes it clearer

    alex
    >-----Original Message-----
    >Is it a Postback if you do a Response.Redirect to the

    same page?
    >
    >Thanks for your help.
    >.
    >
     
    alex bowers, Dec 10, 2003
    #3
  4. no - a postback is seen as a post/get submission where a response.redirect
    is a new request (even with parameters).

    --
    Regards

    John Timney (Microsoft ASP.NET MVP)
    ----------------------------------------------
    <shameless_author_plug>
    Professional .NET for Java Developers with C#
    ISBN:1-861007-91-4
    Professional Windows Forms
    ISBN: 1861005547
    Professional JSP 2nd Edition
    ISBN: 1861004958
    Professional JSP
    ISBN: 1861003625
    Beginning JSP Web Development
    ISBN: 1861002092
    </shameless_author_plug>
    ----------------------------------------------

    "Bruce W..1" <> wrote in message
    news:...
    > Is it a Postback if you do a Response.Redirect to the same page?
    >
    > Thanks for your help.
     
    John Timney \(ASP.NET MVP\), Dec 10, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. DotNetGruven
    Replies:
    3
    Views:
    15,317
  2. =?Utf-8?B?VHJveQ==?=

    Response.redirect does not redirect from .aspx page

    =?Utf-8?B?VHJveQ==?=, Oct 18, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    5,374
    Srowe1975
    Oct 15, 2008
  3. André
    Replies:
    3
    Views:
    1,942
    André
    Dec 1, 2006
  4. Sal
    Replies:
    1
    Views:
    1,036
  5. Ron Howard
    Replies:
    2
    Views:
    582
    Ron Howard
    Aug 11, 2004
Loading...

Share This Page