So could you have an .aspx file that has all the references in it (I assume
you are calling this from a handler), and then you can call
PageParser.GetCompiledPageInstance on the "include" page, which will cause
the right types to be associated with the right file names, and then when
you call GetCompiledPageInstance on the "subtypes" they will be correct.

Could this work for you?

Like RunMe.aspx just has :


<%@ Reference Page="Test1.aspx" %>
<%@ Reference Page="Test2.aspx" %>

And then your code could do this:

public void ProcessRequest(HttpContext Context)
{
//make it compile the "super" page that has the reference directives
PageParser.GetCompiledPageInstance(Context.Request.ApplicationPath,Context.S
erver.MapPath("RunMe.aspx"), Context);
Context.Response.Write("<pre>"+st.ToString()+"</pre>");
IHttpHandler test1
=PageParser.GetCompiledPageInstance(Context.Request.ApplicationPath,Context.
Server.MapPath("Test1.aspx"), Context);
 test1.ProcessRequest(Context);

 IHttpHandler test2
=PageParser.GetCompiledPageInstance(Context.Request.ApplicationPath,Context.
Server.MapPath("Test2.aspx"), Context);
  test2.ProcessRequest(Context);

}

-----Original Message-----
From: Moderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] Behalf Of Jim Arnold
Sent: Friday, February 28, 2003 10:33 AM
To: [EMAIL PROTECTED]
Subject: Re: [ADVANCED-DOTNET] Problem with ASP.Net's parser


Because I'm not creating the page from another page.

Jim

----- Original Message -----
From: "Jon Flanders" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 28, 2003 4:45 PM
Subject: Re: [ADVANCED-DOTNET] Problem with ASP.Net's parser


> Sorry - can you explain why you have to call GetCompiledPageInstance and
not
> use @Reference?

Reply via email to