473,399 Members | 4,254 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

ASPX Page name in user control

A.M
Hi,

I know that i can use Page.Request.Path to find what is the current page
name.

The problem is I can't access to Page object inside a user control.
Is there any way that a user control access to the page class?

Thanks
Ali
Nov 18 '05 #1
8 6885
Try mybase.request.path instead

hth
Regards
Mark
Nov 18 '05 #2
A.M wrote:
Hi,

I know that i can use Page.Request.Path to find what is the current page
name.

The problem is I can't access to Page object inside a user control.
Is there any way that a user control access to the page class?

Thanks
Ali


All Controls have a .Page property...

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 18 '05 #3
Hi A.M,

What's the problem you got? You should be able to access the Page property
inside a user control. Just as Craig said, all asp.net controls should have
this property, including user controls.

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "A.M" <IH*******@sapm123.com>
Subject: ASPX Page name in user control
Date: Sun, 1 Feb 2004 19:33:09 -0500
Lines: 12
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <uv**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: cpe004005cf3829-cm014250035364.cpe.net.cable.rogers.com 24.156.95.201Path: cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!cpmsftng xa06.phx.gbl!TK2MSFTNGP08.
phx.gbl!TK2MSFTNGP10.phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:206809
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hi,

I know that i can use Page.Request.Path to find what is the current page
name.

The problem is I can't access to Page object inside a user control.
Is there any way that a user control access to the page class?

Thanks
Ali


Nov 18 '05 #4
A.M

For some reason my IDE Intlisence doesn't show Page's mebers. That
missleadded me. I used Page inside the user control and now ican see it
works fine.
Does your IDE shows the Page's propertis?

Thanks for reply,
Ali
"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
news:EQ**************@cpmsftngxa07.phx.gbl...
Hi A.M,

What's the problem you got? You should be able to access the Page property
inside a user control. Just as Craig said, all asp.net controls should have this property, including user controls.

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: "A.M" <IH*******@sapm123.com>
Subject: ASPX Page name in user control
Date: Sun, 1 Feb 2004 19:33:09 -0500
Lines: 12
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <uv**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: cpe004005cf3829-cm014250035364.cpe.net.cable.rogers.com
24.156.95.201
Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!cpmsftng xa06.phx.gbl!TK2MSFTNGP08. phx.gbl!TK2MSFTNGP10.phx.gbl
Xref: cpmsftngxa07.phx.gbl

microsoft.public.dotnet.framework.aspnet:206809X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Hi,

I know that i can use Page.Request.Path to find what is the current page
name.

The problem is I can't access to Page object inside a user control.
Is there any way that a user control access to the page class?

Thanks
Ali

Nov 18 '05 #5
Yes. I just typed:

"this." (without quotations), then I can see the Page property in the
Intlisence menu :- )

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "A.M" <IH*******@sapm123.com>
References: <uv**************@TK2MSFTNGP10.phx.gbl> <EQ**************@cpmsftngxa07.phx.gbl>Subject: Re: ASPX Page name in user control
Date: Mon, 2 Feb 2004 09:26:26 -0500
Lines: 65
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <e1**************@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 209.226.40.154
Path: cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!tk2msftngp13.phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:206903
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
For some reason my IDE Intlisence doesn't show Page's mebers. That
missleadded me. I used Page inside the user control and now ican see it
works fine.
Does your IDE shows the Page's propertis?

Thanks for reply,
Ali
"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
news:EQ**************@cpmsftngxa07.phx.gbl...
Hi A.M,

What's the problem you got? You should be able to access the Page property inside a user control. Just as Craig said, all asp.net controls should

have
this property, including user controls.

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no

rights.


--------------------
>From: "A.M" <IH*******@sapm123.com>
>Subject: ASPX Page name in user control
>Date: Sun, 1 Feb 2004 19:33:09 -0500
>Lines: 12
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <uv**************@TK2MSFTNGP10.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host:

cpe004005cf3829-cm014250035364.cpe.net.cable.rogers.com
24.156.95.201
>Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!cpmsftn gxa06.phx.gbl!TK2MSFTNGP08

Nov 18 '05 #6
A.M

If I type Page., after pressing dot key, it doesn't show members. Other than
that, my intelisence works fine.
How can check intelisence settings ?

Thanks,
Ali

"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
news:LN**************@cpmsftngxa07.phx.gbl...
Yes. I just typed:

"this." (without quotations), then I can see the Page property in the
Intlisence menu :- )

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

--------------------
From: "A.M" <IH*******@sapm123.com>
References: <uv**************@TK2MSFTNGP10.phx.gbl> <EQ**************@cpmsftngxa07.phx.gbl>
Subject: Re: ASPX Page name in user control
Date: Mon, 2 Feb 2004 09:26:26 -0500
Lines: 65
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <e1**************@tk2msftngp13.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 209.226.40.154
Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTN GXA05.phx.gbl!TK2MSFTNGP08 phx.gbl!tk2msftngp13.phx.gbl
Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:206903
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
For some reason my IDE Intlisence doesn't show Page's mebers. That
missleadded me. I used Page inside the user control and now ican see it
works fine.
Does your IDE shows the Page's propertis?

Thanks for reply,
Ali
"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
news:EQ**************@cpmsftngxa07.phx.gbl...
Hi A.M,

What's the problem you got? You should be able to access the Page

property inside a user control. Just as Craig said, all asp.net controls should

have
this property, including user controls.

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no

rights.


--------------------
>From: "A.M" <IH*******@sapm123.com>
>Subject: ASPX Page name in user control
>Date: Sun, 1 Feb 2004 19:33:09 -0500
>Lines: 12
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <uv**************@TK2MSFTNGP10.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host:

cpe004005cf3829-cm014250035364.cpe.net.cable.rogers.com
24.156.95.201
>Path:


cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!cpmsftn gxa06.phx.gbl!TK2MSFTNGP08

Nov 18 '05 #7
Hi A.M,

It seems weird, the Intelisence should appear after pressing dot key. The
Intelisence settings are located at:

Tool->Options->Text Editor->C#/Basic/->General. However, you only need to
enable "Auto list members" option, which is enabled by default, the
Intelisence can work.

BTW, does it work if you create a new User Contorl? Does restarting VS.NET
IDE fix the problem?

Thanks,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: "A.M" <IH*******@sapm123.com>
References: <uv**************@TK2MSFTNGP10.phx.gbl> <EQ**************@cpmsftngxa07.phx.gbl>
<e1**************@tk2msftngp13.phx.gbl>
<LN**************@cpmsftngxa07.phx.gbl>Subject: Re: ASPX Page name in user control
Date: Mon, 2 Feb 2004 13:17:41 -0500
Lines: 95
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <#a**************@TK2MSFTNGP09.phx.gbl>
Newsgroups: microsoft.public.dotnet.framework.aspnet
NNTP-Posting-Host: 209.226.40.154
Path: cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTN GP08.phx.gbl!TK2MSFTNGP09.
phx.gblXref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:206954
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
If I type Page., after pressing dot key, it doesn't show members. Other thanthat, my intelisence works fine.
How can check intelisence settings ?

Thanks,
Ali

"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
news:LN**************@cpmsftngxa07.phx.gbl...
Yes. I just typed:

"this." (without quotations), then I can see the Page property in the
Intlisence menu :- )

Regards,

Felix Wu
=============
This posting is provided "AS IS" with no warranties, and confers norights.


--------------------
>From: "A.M" <IH*******@sapm123.com>
>References: <uv**************@TK2MSFTNGP10.phx.gbl>

<EQ**************@cpmsftngxa07.phx.gbl>
>Subject: Re: ASPX Page name in user control
>Date: Mon, 2 Feb 2004 09:26:26 -0500
>Lines: 65
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <e1**************@tk2msftngp13.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host: 209.226.40.154
>Path:

cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT NGXA05.phx.gbl!TK2MSFTNGP0

8
phx.gbl!tk2msftngp13.phx.gbl
>Xref: cpmsftngxa07.phx.gblmicrosoft.public.dotnet.framework.aspnet:206903 >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
>
>
>For some reason my IDE Intlisence doesn't show Page's mebers. That
>missleadded me. I used Page inside the user control and now ican see it
>works fine.
>Does your IDE shows the Page's propertis?
>
>Thanks for reply,
>Ali
>
>
>"Felix Wu [MSFT]" <fe*****@online.microsoft.com> wrote in message
>news:EQ**************@cpmsftngxa07.phx.gbl...
>> Hi A.M,
>>
>> What's the problem you got? You should be able to access the Page

property
>> inside a user control. Just as Craig said, all asp.net controls should
>have
>> this property, including user controls.
>>
>> Regards,
>>
>> Felix Wu
>> =============
>> This posting is provided "AS IS" with no warranties, and confers no
>rights.
>>
>>
>> --------------------
>> >From: "A.M" <IH*******@sapm123.com>
>> >Subject: ASPX Page name in user control
>> >Date: Sun, 1 Feb 2004 19:33:09 -0500
>> >Lines: 12
>> >X-Priority: 3
>> >X-MSMail-Priority: Normal
>> >X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>> >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>> >Message-ID: <uv**************@TK2MSFTNGP10.phx.gbl>
>> >Newsgroups: microsoft.public.dotnet.framework.aspnet
>> >NNTP-Posting-Host:
>cpe004005cf3829-cm014250035364.cpe.net.cable.rogers.com
>> 24.156.95.201
>> >Path:
>>


cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!cpmsft ngxa06.phx.gbl!TK2MSFTNGP0

8


Nov 18 '05 #8
The User Control inherits from the Control class if I remember
correctly. More after I check in detail.

with regards,
J.V.Ravichandran
- http://www.geocities.com/
jvravichandran
- http://www.411asp.net/func/search?
qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
at http://www.Google.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ralph O'Flinn | last post by:
What I want to be able to do is create a user control that will display an entire page page within it. Does anyone know how to do this or better yet have any same code? It would be very much...
1
by: Dan | last post by:
I have an asp.net page default.aspx with a user control and a placeholder control. <html> <body> <form id="myform" method="post" runat="server" /> <PageHeader:Header id="header1"...
2
by: Alex Wagner | last post by:
I've been trying to gain access to the container page from within a user control. Case in point: From within the user control I need to call a method in the business layer that needs a reference...
0
by: Merkisson Jourhanssen | last post by:
I will be using LoadControl to add user control to aspx page at runtime. The user control hosts a server control (custom menu component) which requires property setting to display menu correctly: ...
2
by: Raed Sawalha | last post by:
I have a aspx page with one user control , in the user control i have hidden field (name hdnSaved) runat server wrapped in property like following :- in documentview.ascx public string...
13
by: Michael | last post by:
I have setup a public variable in the Master Page "code-behind-file". Now I would like to set that value from the UserControl, but I can't seem to find a way to do this. Does anyone have any ideas?...
1
by: Yanesh Tyagi | last post by:
Hi All have a web page named itemList.aspx. It contains a datagrid (id = datagrid1). The web form also have a user control named itemSearch.ascx. This user control have several options to search...
5
by: Fernando Chilvarguer | last post by:
I'm sure this has come up before but I could not find any post on it. How can I read a variable or property that has been set on a ASPX page from inside a ASCX control. ASPX code: public...
4
by: Eric | last post by:
I got a particular problem in visual studio 2005 There's a user control on page and I want to meka a cast like this MyPage mp=(MyPage)this.Page; Error is : cannot cast from...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.