Finding the superior page from a nested page...

  • Thread starter Thread starter John Sedlak
  • Start date Start date
J

John Sedlak

Hello, in one of my pages I have an include:

<!--#include file="console.aspx" -->

Now...Inside console.aspx, I want to be able to find the
name of the page that included it. This is because I
include console.aspx in every page...

Thank you!
 
The most common replacement for old fashioned include files are web user
controls.
They basically are like object oriented include files on steroids.

Then from within your control you can access information about the parent
page by using the "Parent" object.

Here's more info:
http://msdn.microsoft.com/library/d...n/html/vbconintroductiontowebusercontrols.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vboriwebusercontrols.asp
http://msdn.microsoft.com/library/d...l/vbconWebUserControlsVsCustomWebControls.asp
 
Thanks. But I am still confused at how to get the actual
url/filename of that page.
 
You can get such information from the Request object, e.g. Request.Path,
Request.FilePath or something like that.

HTH,
Axel Dahmen


---------------------------------
 
You can get such information from the Request object, e.g. Request.Path,
Request.FilePath or something like that.

HTH,
Axel Dahmen


---------------------------------
 
THANK YOU ALL!
You have been a great help to me. I am loving ASP.NET! I
can't wait until I get to college...
 
Back
Top