Forcing page.ispostback to run...

J

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
 
C

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top