By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,750 Members | 1,471 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,750 IT Pros & Developers. It's quick & easy.

Finding the superior page from a nested page...

P: n/a
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!
Nov 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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/de...ercontrols.asp
http://msdn.microsoft.com/library/de...ercontrols.asp
http://msdn.microsoft.com/library/de...ebControls.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"John Sedlak" <js*****@optonline.net> wrote in message
news:06****************************@phx.gbl...
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!

Nov 17 '05 #2

P: n/a
Correction: I meant to say the "Page" object (not the parent object.)

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in message
news:ub**************@TK2MSFTNGP09.phx.gbl...
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/de...ercontrols.asp http://msdn.microsoft.com/library/de...ercontrols.asp http://msdn.microsoft.com/library/de...ebControls.asp
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com

"John Sedlak" <js*****@optonline.net> wrote in message
news:06****************************@phx.gbl...
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!


Nov 17 '05 #3

P: n/a
Thanks. But I am still confused at how to get the actual
url/filename of that page.
-----Original Message-----
The most common replacement for old fashioned include files are web usercontrols.
They basically are like object oriented include files on steroids.
Then from within your control you can access information about the parentpage by using the "Parent" object.

Here's more info:
http://msdn.microsoft.com/library/default.asp? url=/library/en-
us/vbcon/html/vbconintroductiontowebusercontrols.asphttp://msdn.microsoft.com/library/default.asp? url=/library/en-us/vbcon/html/vboriwebusercontrols.asphttp://msdn.microsoft.com/library/default.asp? url=/library/en-
us/vbcon/html/vbconWebUserControlsVsCustomWebControls.asp
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able- consulting.com
"John Sedlak" <js*****@optonline.net> wrote in message
news:06****************************@phx.gbl...
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!

.

Nov 17 '05 #4

P: n/a
You can get such information from the Request object, e.g. Request.Path,
Request.FilePath or something like that.

HTH,
Axel Dahmen
---------------------------------
"John Sedlak" <js*****@optonline.net> schrieb im Newsbeitrag
news:05****************************@phx.gbl...
Thanks. But I am still confused at how to get the actual
url/filename of that page.
-----Original Message-----
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/default.asp?

url=/library/en-
us/vbcon/html/vbconintroductiontowebusercontrols.asp
http://msdn.microsoft.com/library/default.asp?

url=/library/en-us/vbcon/html/vboriwebusercontrols.asp
http://msdn.microsoft.com/library/default.asp?

url=/library/en-
us/vbcon/html/vbconWebUserControlsVsCustomWebControls.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-

consulting.com

"John Sedlak" <js*****@optonline.net> wrote in message
news:06****************************@phx.gbl...
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!

.

Nov 17 '05 #5

P: n/a
You can get such information from the Request object, e.g. Request.Path,
Request.FilePath or something like that.

HTH,
Axel Dahmen
---------------------------------
"John Sedlak" <js*****@optonline.net> schrieb im Newsbeitrag
news:05****************************@phx.gbl...
Thanks. But I am still confused at how to get the actual
url/filename of that page.
-----Original Message-----
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/default.asp?

url=/library/en-
us/vbcon/html/vbconintroductiontowebusercontrols.asp
http://msdn.microsoft.com/library/default.asp?

url=/library/en-us/vbcon/html/vboriwebusercontrols.asp
http://msdn.microsoft.com/library/default.asp?

url=/library/en-
us/vbcon/html/vbconWebUserControlsVsCustomWebControls.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-

consulting.com

"John Sedlak" <js*****@optonline.net> wrote in message
news:06****************************@phx.gbl...
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!

.



Nov 17 '05 #6

P: n/a
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...
-----Original Message-----
Correction: I meant to say the "Page" object (not the parent object.)
--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able- consulting.com

"Steve C. Orr [MVP, MCSD]" <St***@Orr.net> wrote in messagenews:ub**************@TK2MSFTNGP09.phx.gbl...
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/default.asp?

url=/library/en-
us/vbcon/html/vbconintroductiontowebusercontrols.asp

http://msdn.microsoft.com/library/default.asp?

url=/library/en-us/vbcon/html/vboriwebusercontrols.asp

http://msdn.microsoft.com/library/default.asp?

url=/library/en-
us/vbcon/html/vbconWebUserControlsVsCustomWebControls.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able- consulting.com
"John Sedlak" <js*****@optonline.net> wrote in message
news:06****************************@phx.gbl...
> 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!


.

Nov 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.