Two Web pages

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

Demetri

Sure

For a push button the easiest way is in design mode double click on the button you want to assign code to. By double clicking it you will be automatically taken to the code behind and your cursor will be in the button's onclick event handler. And you can put something like the following

Response.Redirect("somepage.aspx?id=" & Session("userID") & "&mode=edit"

This way you can concatenate query string parameters along with your url you want to pass the user to

If you don't need to add any parameters - simply use a HyperLink control and assign the Navigate property the relative url of the page you want the user to be directed to
 

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,079
Messages
2,570,575
Members
47,207
Latest member
HelenaCani

Latest Threads

Top