Postback, a hassle!?

Discussion in 'ASP .Net' started by SparvHok, Dec 7, 2004.

  1. SparvHok

    SparvHok Guest

    I have big issues with the loading process of asp.net pages, especially
    the Postback process.

    Seriously, is it really supposed to help or mess things up?

    I have a page, creates/edits and deletes news... nothing unusual. The
    problem is that when using Querystring (action=delete&newsid=5) it
    realoads the page totally blank!? Howcome?

    The last instruction in the delete function tells the page to reload
    (Response.Redirect, have also tried with Server.Transfer). It seems
    though the page keeps the QueryString values and tries to repeat the
    delete-process or something.

    Could someone please explain whats happening or if there is a nicer way
    of doing it?


    --

    +======================================================================+
    | SparrowHawk The Magician |
    | |
    | |
    | |
    | |
    +======================================================================+
    | e-mail: sparvhok[NOSPAM]hotmail.com |
    +======================================================================+
    To send me an email, replace the [NOSPAM] tag with @ sign.
     
    SparvHok, Dec 7, 2004
    #1
    1. Advertising

  2. You will probably need to post some more code. I have a hard time believe
    Response.Redirect( "page.aspx" ) will have a querystring appended to it.

    You could check if the page is posting back before you perform any
    operations.

    page_load

    if ( !Page.IsPostBack )
    {
    //the first time the page loads.
    }
    else
    {
    //when the page is posting back to itself.
    }

    //run this everytime the page loads irregardless of postbacks.

    bill

    "SparvHok" <"sparvhok[NOSPAM]"@hotmail.com> wrote in message
    news:%...
    > I have big issues with the loading process of asp.net pages, especially
    > the Postback process.
    >
    > Seriously, is it really supposed to help or mess things up?
    >
    > I have a page, creates/edits and deletes news... nothing unusual. The
    > problem is that when using Querystring (action=delete&newsid=5) it
    > realoads the page totally blank!? Howcome?
    >
    > The last instruction in the delete function tells the page to reload
    > (Response.Redirect, have also tried with Server.Transfer). It seems
    > though the page keeps the QueryString values and tries to repeat the
    > delete-process or something.
    >
    > Could someone please explain whats happening or if there is a nicer way
    > of doing it?
    >
    >
    > --
    >
    > +======================================================================+
    > | SparrowHawk The Magician |
    > | |
    > | |
    > | |
    > | |
    > +======================================================================+
    > | e-mail: sparvhok[NOSPAM]hotmail.com |
    > +======================================================================+
    > To send me an email, replace the [NOSPAM] tag with @ sign.
     
    William F. Robertson, Jr., Dec 7, 2004
    #2
    1. Advertising

  3. SparvHok

    Patrice Guest

    Difficult to say without seeing some code. You should see exactly in the
    browser if you have something int he querystring. You could alos trace to
    make sure what is the control flow.

    Most of the time, the action is posted as a form field rather than passed on
    the querystring (part of the ASP.NET infrastructure that does quite a job at
    simulating event driven programming.)...

    Patrice

    --

    "SparvHok" <"sparvhok[NOSPAM]"@hotmail.com> a écrit dans le message de
    news:%...
    > I have big issues with the loading process of asp.net pages, especially
    > the Postback process.
    >
    > Seriously, is it really supposed to help or mess things up?
    >
    > I have a page, creates/edits and deletes news... nothing unusual. The
    > problem is that when using Querystring (action=delete&newsid=5) it
    > realoads the page totally blank!? Howcome?
    >
    > The last instruction in the delete function tells the page to reload
    > (Response.Redirect, have also tried with Server.Transfer). It seems
    > though the page keeps the QueryString values and tries to repeat the
    > delete-process or something.
    >
    > Could someone please explain whats happening or if there is a nicer way
    > of doing it?
    >
    >
    > --
    >
    > +======================================================================+
    > | SparrowHawk The Magician |
    > | |
    > | |
    > | |
    > | |
    > +======================================================================+
    > | e-mail: sparvhok[NOSPAM]hotmail.com |
    > +======================================================================+
    > To send me an email, replace the [NOSPAM] tag with @ sign.
     
    Patrice, Dec 7, 2004
    #3
    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. Paul Watt

    hassle with layout

    Paul Watt, Apr 4, 2006, in forum: HTML
    Replies:
    3
    Views:
    360
    Paul Watt
    Apr 4, 2006
  2. kanzen
    Replies:
    7
    Views:
    401
    =?ISO-8859-1?Q?Gerhard_H=E4ring?=
    Mar 23, 2005
  3. Evan Kroske

    Python 2.6 worth the hassle?

    Evan Kroske, May 6, 2009, in forum: Python
    Replies:
    1
    Views:
    281
    Steven D'Aprano
    May 7, 2009
  4. Mark

    hassle with macro

    Mark, Apr 26, 2010, in forum: C Programming
    Replies:
    3
    Views:
    288
    Ralf Damaschke
    Apr 26, 2010
  5. Mirco Wahab

    substr() hassle, *n*x vs. Win32

    Mirco Wahab, Jun 14, 2006, in forum: Perl Misc
    Replies:
    4
    Views:
    186
Loading...

Share This Page