Get container of user control

  • Thread starter Thread starter PontiMax
  • Start date Start date
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
 
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
 
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

Back
Top