a step by step page

S

Steve Richter

I want my web page to display its contents in a step by step process.

step1: enter a zip code, click the "next step" button

in the NextStep button click event:
- retrieve info that pertains to the zip code
- make a "step2" label visible on the page
- fill the "step2" label with the zip code info
- make a "proceed to step3" button visible
- set the "CurrentStep" view state = "step2"

etc, etc

the problem is, the "next step" button click event executes after
PageLoad. Any changes this method makes to the Visible=true status of
a control does not take affect until the next post back cycle. At
least that is the way it appears.

I am aware I can use Response.Redirect to pass a querystring that holds
the step number, but that gets a bit involved because I want the page
to retain all the data calculated by each step.

I am also aware I can do something in PageLoad to determine what button
was clicked to Post the page, but having to do that makes no sense.
The click event handler is the place to handle click events, right?

also, I would like to know which asp control is best suited to this
type of an application, one where a succession of information is
unfurled to the user as they click on the page.

I am using the asp:Table control and setting each asp:TableRow to
visible as its turn comes up to be displayed. I would prefer a series
of DIVs with a <hr> between each DIV.

thanks,

-Steve
 
G

Guest

it would help to see some code, but i get the idea. you want to make sure to
use:
if not ispostback then
........
..........

end
to do all the initialzing, but not do it again. also make sure you are
maintaining view state. I know this did not answer all questions, but should
get you started.
thanks
kes
 
S

Steve Richter

Kurt said:
it would help to see some code, but i get the idea. you want to make sure to
use:
if not ispostback then
.......
.........

ok Kurt, thank you. That helped. I was reaching some conclusions
based on the false assumption that once the button click event was
fired it was too late to affect the visible status of a control. Which
really made things confusing for me :)

thanks for the help,

-Steve
 

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

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top