ASPX Page name in user control

  • Thread starter Thread starter A.M
  • Start date Start date
A

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
 
A.M said:
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...
 
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.


--------------------
 
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
 
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
 
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.


--------------------
<[email protected]>
 
Back
Top