Parent page name (Usercontrol)

H

Henrik de Jong

Use Page.Request.RawUrl

Some documentation:

The raw URL is defined as the part of the URL following the domain
information. In the URL string http://www.contoso.com/articles/recent.aspx,
the raw URL is/articles/recent.aspx. The raw URL includes the query string,
if present.


kind regards,
henrik



John said:
Hi Oleg, thanks for that. I actually wanted to print out the whole string
including the page name

e.g

if the usercontrol is contained in a page called index.aspx
and the page index.aspx has a querystring of ?ID=66666

then I want the usercontrol to print both the container page name
(index.aspx in this case) as well as the querystring (?ID=66666) as given in
the above example

thanks again
Mark



--

Page.Request["ID"]

-Oleg.

Hi, is it possible for a UserControl to get the Page name and
querystring
of
its parent?

e.g If a userControl is inside a page called "index.aspx?ID=66" how
can
 
J

John

Hi, is it possible for a UserControl to get the Page name and querystring of
its parent?

e.g If a userControl is inside a page called "index.aspx?ID=66" how can a
usercontrol print out this value? I was hoping there might be a
Parent.PageName or Parent.Querystring method :)

Thanks in advance
John
 
J

John

Hi Oleg, thanks for that. I actually wanted to print out the whole string
including the page name

e.g

if the usercontrol is contained in a page called index.aspx
and the page index.aspx has a querystring of ?ID=66666

then I want the usercontrol to print both the container page name
(index.aspx in this case) as well as the querystring (?ID=66666) as given in
the above example

thanks again
Mark



--

Oleg Ogurok said:
Page.Request["ID"]

-Oleg.

Hi, is it possible for a UserControl to get the Page name and
querystring
of
its parent?

e.g If a userControl is inside a page called "index.aspx?ID=66" how can a
usercontrol print out this value? I was hoping there might be a
Parent.PageName or Parent.Querystring method :)

Thanks in advance
John
 
J

John

Cool, thanks for that :)
Cheers
Mark
Henrik de Jong said:
Use Page.Request.RawUrl

Some documentation:

The raw URL is defined as the part of the URL following the domain
information. In the URL string http://www.contoso.com/articles/recent.aspx,
the raw URL is/articles/recent.aspx. The raw URL includes the query string,
if present.


kind regards,
henrik



John said:
Hi Oleg, thanks for that. I actually wanted to print out the whole string
including the page name

e.g

if the usercontrol is contained in a page called index.aspx
and the page index.aspx has a querystring of ?ID=66666

then I want the usercontrol to print both the container page name
(index.aspx in this case) as well as the querystring (?ID=66666) as
given
in
the above example

thanks again
Mark



--

Page.Request["ID"]

-Oleg.

Hi, is it possible for a UserControl to get the Page name and querystring
of
its parent?

e.g If a userControl is inside a page called "index.aspx?ID=66" how
can
a
usercontrol print out this value? I was hoping there might be a
Parent.PageName or Parent.Querystring method :)

Thanks in advance
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top