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

Reply via email to