Popup question...

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Hello there,

I have a popup scenario that can't seem to solve.

I have an aspx form. A user fills in some information and presses a submit
button. The submit does a postback and makes some changes in the database.
At this point two things can happen.

1. The form can succeed and everyone is happy and I'm done.
2. The postback finds something in the database and needs to ask the user a
yes/no question.

With scenario two, I would like a popup to be displayed at this point. If
the person presses Yes, the page would continue commiting the data to the
database. If the person presses no on the popup the process will stop and
return the user to the form to be edited.

Can someone point me in the right direction?

Thank you,
Chris
 
Hello,

So at step 2 when the postback needs to ask a question you'll need to render
a page to the browser (so that you can ask a question client side) and based
on the response it will just do nothing (if the user answered no) or it will
posback again for further processing (if the user answered yes).

If really needed my personal preference would be likely :
- to have a web service that finds out if the question needs to be asked
- so when the submit button is pressed I can call this service to know if
the question needs to be asked and then postback once knowing the answer.

Some more details about the kind of question could perhaps help. My very
first move would be to see if knowing if the question needs to be asked
could be done before hand when the page is first displayed. This way you
would be able to ask the question (if needed) and postback once the response
being just another data part of a single postback.
 
Back
Top