Get container of user control

P

PontiMax

My aspx page contains a placeholder control which I use to
display various user controls.

Is it possible to get a reference to the page instance
from within the user control? The property "Parent" refers
to the placeholder control, not to the containing page...

Thanks,
PontiMax
 
K

Kevin Spencer

Try the Page property. Every Control has one.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living
 
H

Hans Kesting

PontiMax said:
My aspx page contains a placeholder control which I use to
display various user controls.

Is it possible to get a reference to the page instance
from within the user control? The property "Parent" refers
to the placeholder control, not to the containing page...

Thanks,
PontiMax

Control has a Page property ...

Hans Kesting
 

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

Top