Coice of pages to load

  • Thread starter Thread starter Smoothice
  • Start date Start date
S

Smoothice

Can anyone tell me how to do this I am very new and
experimenting with asp.net using vb I want to have to
different buttons that load and pass data to different
pages depending on the button pushed. I tried to use two
forms but asp.net will only allow one form per page. Is
there anyway to do this?
 
I'd use 5 buttons, same form. In each button's click event handler, I'd put
the following:

'Execute button specific code in place of this
Response.Redirect
("button_specific_page_goes_here.aspx?button_specific_query_params_go_here")

Unless you purposely dork around with things, asp.net forms always post back
to themselves, so it's up to you to do page redirection in the events where
necessary.

I was minding my own business when Smoothice blurted out:
 
Smoothice,

Another option, depending on how many "pages" you need to display is to use
panels.

Place each individual "page's" content into separate panels dropped onto the
single page. Set each panel's visiblity to False. Then when the button is
clicked set the panel's visiblity to true.

This is probably the easiest way to give the same effect as having multiple
pages. Plus there is the added benefit that every "page's" data is available
at all times.

It works great if you just need to display three or four different pages. If
you need to have more than that then Response.Redirect is probably a better
way to go.

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
Back
Top