Changing pages

B

BobLaughland

Hi There,

Just wondering if in ASP .NET 2.0 C# you can change the web page
programatically?

I am wanting to click a button, perform some code in the button click
function, and then change pages.

Thanks,

Peter.
 
J

Joey

Put your code in the button click event handler (double click the
button in the designer to create the event handler in the code behind
page). Right after that, while still in that same code block, do a
Response.Redirect("MyNextPage.aspx") or
Server.Transfer("MyNextPage.aspx").
 

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,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top