Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Another newbie question (C#)


Message #1 by Lars Solem <Lars.Solem@v...> on Tue, 28 Nov 2000 13:16:57 +0100
I want to do something as simple as jumping between web-pages. My Web

Application project in C# consists of two webforms (webform1.aspx/cs and

webform2.aspx/cs). When I push a button in webform1.aspx I want the

application to perform something in the Button1_Click method in

WebForm1.cs, and then jump to WebForm2.aspx whitin the same session state.

How do I do this jumping?



Thanks, Lars

Message #2 by =?iso-8859-1?Q?Fredrik_Norm=E9n?= <fredrik.normen@e...> on Tue, 28 Nov 2000 14:56:18 +0100
To redisrect to other pages you can use one of this:

Server.Execute, Server.Transfer, Response.Redirect or Page.Navigate.



Server.Execute will not call HTTPResponse.End.

Server.Transfer will first call HTTPServerUtility.Execte and after that

HTTPResponse.End.

Response.Redirect this will send headers to the client to do the

Redirection. So it take some extra step to the client.

Page.Navigate The first calls Response.Redirect, the second recursively

Unloads all controls in the tree, and the last calls Response.End.



So I think you can try the Server.Execute or Transfer to solve you problem..



/Fredrik Normén





-----Original Message-----

From: Lars Solem [mailto:Lars.Solem@v...]

Sent: den 28 november 2000 13:17

To: ASP+

Subject: [aspx] Another newbie question (C#)





I want to do something as simple as jumping between web-pages. My Web

Application project in C# consists of two webforms (webform1.aspx/cs and

webform2.aspx/cs). When I push a button in webform1.aspx I want the

application to perform something in the Button1_Click method in

WebForm1.cs, and then jump to WebForm2.aspx whitin the same session state.

How do I do this jumping?



Thanks, Lars




  Return to Index