|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Forcing page.ispostback to run...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 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 >
Waiting for process end , how?
Active Directory Option strict question. Waiting for com program to terminate Viewing machine data source names Label changes not being reflected until loop is done Fill up string array with random characters? what have they done to the left function how to format text for email message Draw Line in a specific picturebox |
|||||||||||||||||||||||