Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Call another web form
Message
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires Web
Divers
Thread ID:
00671830
Message ID:
00671833
Vues:
14
This message has been marked as the solution to the initial question of the thread.
Steve,

>I have webform1.aspx with a button (button1). In the button1_click() event, I would like to call webform2.aspx.
>
>How do I do that?

The easiest way to do this is by means of the ASP.NET Response object:


Response.Redirect("webform2.aspx"); // C#

Response.Redirect("webform2.aspx") // VB .NET


You can also use the Server object's Transfer method to transfer AND session state from the first page to the second page without making a round trip to the client:
Server.Transfer("webform2.aspx");   // C#

Server.Transfer("webform2.aspx")   // VB .NET
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform