Coice of pages to load

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?
 
C

-=Chris=-

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:
 
S

S. Justin Gengo

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
 

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

No members online now.

Forum statistics

Threads
474,082
Messages
2,570,589
Members
47,212
Latest member
JaydenBail

Latest Threads

Top