Cosmin, It looks like what you really want to do (looking at your pseudo code) is to use user controls. (*.ascx).
You are effectively writing a host page with all your furniture (menu, header, footer etc.) and the content wants to change. You can use loadcontrol to load a user control. A user control is just a web page but with specific access. (It is fairly easy to convert an ASPX to ASCX and vice versa). If you need any more help with doing it this way, give me a shout. I will see what I can do. I have been writing ASP.NET (with C#) for the past couple of years and use this technique quite a lot. Best regards, Dave Colliver. http://www.AshfieldFOCUS.com ~~ http://www.FOCUSPortals.com - Local franchises available ----- Original Message ----- From: "Cosmin Prund" <[EMAIL PROTECTED]> To: "Delphi-Talk Discussion List" <delphi-talk@elists.org> Sent: Thursday, February 15, 2007 3:23 PM Subject: Re: ASP.NET question: How do I pass a parameter to a new page? > Thanks Kraven and Darling Michael, > > Both methods (or is it the same method?) require my SECOND page to have > knowledge of the CALLING page. This is not what I want. Here's an longer > example, maybe this makes it clearer: > > I've got three pages: FrontPage.aspx, Search.aspx and ShowObject.aspx; > Both my FrontPage.aspx and my Search.aspx show a list of "objects". When > I click on one of those objects I want to show the ShowObject.aspx page > with the expected parameters. If I use > Response.Redirect('FrontPage.aspx?id=1234') it works as expected BUT > this requires a round-treep to the browser. If I correctly understand > what you both are saying, I can use Server.Transfer('FrontPage.aspx') > and then, from FrontPage.aspx use some trick and get my parameter from > the calling page. That's *strange* and unacceptable because it requires > the CALLED page to have knowledge about every single CALLING page out > there! > > It's also very possible that I misunderstood what you were saying - > that's because I'm new to both ASP and ASP.NET. > > This is what I'm hoping for: (pseudocode, very simmilar to my working > code for user controls / asCx): > > procedure FwdToPage; > var NewPage:TMySecondPage; > begin > NewPage := LoadPage('ShowObject.aspx'); > NewPage.id_obj := 1234; > NewPage.InitPage; > Server.ShowThisPage(NewPage); > end; > > Thanks, > Cosmin Prund > > Kraven wrote: >> Hi there, >> I'm not a .NET programmer but I am an ASP expert. >> Request.Form("formobjectnamehere") is how to obtain the value within any >> object on the form. >> This should be the same on ASP.NET > > > Darling, Michael wrote: > > I think the ASP.NET way is to use the Context.Handler object. Using > > Server.Transfer you still have access to any public properties on the > > first page. > >> Your receiving page needs to know about the type of the first page but >> then you can cast the Context.Handler into this type and access any >> properties in your receiving Page_Load > > __________________________________________________ > Delphi-Talk mailing list -> Delphi-Talk@elists.org > http://www.elists.org/mailman/listinfo/delphi-talk __________________________________________________ Delphi-Talk mailing list -> Delphi-Talk@elists.org http://www.elists.org/mailman/listinfo/delphi-talk