Home All Groups Group Topic Archive Search About

Forcing page.ispostback to run...

Author
15 Aug 2006 6:56 AM
Jeff
I assume that this is an easy newby question...

How can I conditionally force the code in a "if not page.ispostback sub" to run even if the page is posting back?

More specifically, I have a web application in VB (2005) which runs through a series of questions stored in a database. Answers to
the questions are stored back into the database on the first page post back. The user then clicks a "next" button, which is intended
to load the next question into a label on the same page. The next button, of course, increases a question pointer and now should run
the code that currently is in the not page.ispostback sub. Can this be done, or do I have to take that code out of the sub and run
it needlessly on every post back? Do I simply use response.redirect and call the same file?

Thanks in advance

Jeff




--
Posted via a free Usenet account from http://www.teranews.com

Author
15 Aug 2006 7:48 AM
Cor Ligthert [MVP]
Jeff,

As I understand you well than you simply should not call response.redirect.
This is initializing the page everytime as new page.

If you do nothing the postback to the client is done automaticly with the
updated situation on the page.

I am not sure if this is your question, but I hope that it helps,

Cor

Show quoteHide quote
"Jeff" <n***@none.com> schreef in bericht
news:44e154a7$0$11741$88260bb3@free.teranews.com...
>I assume that this is an easy newby question...
>
> How can I conditionally force the code in a "if not page.ispostback sub"
> to run even if the page is posting back?
>
> More specifically, I have a web application in VB (2005) which runs
> through a series of questions stored in a database. Answers to
> the questions are stored back into the database on the first page post
> back. The user then clicks a "next" button, which is intended
> to load the next question into a label on the same page. The next button,
> of course, increases a question pointer and now should run
> the code that currently is in the not page.ispostback sub. Can this be
> done, or do I have to take that code out of the sub and run
> it needlessly on every post back? Do I simply use response.redirect and
> call the same file?
>
> Thanks in advance
>
> Jeff
>
>
>
>
> --
> Posted via a free Usenet account from http://www.teranews.com
>