UpdatePanel

M

Mark Fitzpatrick

How do you mean load a page inside an update panel? An update panel is
contained on a page, with controls as the contents. So, you're running
within a page already and wouldn't really load another page within it. Can
you elaborate more on what you're trying to do and maybe someone here will
have a better suggestion on how to accompish it?
 
L

Lloyd Sheen

Mark Fitzpatrick said:
How do you mean load a page inside an update panel? An update panel is
contained on a page, with controls as the contents. So, you're running
within a page already and wouldn't really load another page within it. Can
you elaborate more on what you're trying to do and maybe someone here will
have a better suggestion on how to accompish it?

There is a way to do this but it takes some coding.

First use UserControls rather than pages. A usercontrol is generally a page
without the @page directive which is replaced with a @Control directive.

You can test all the UserControls as pages until they work if you want and
then replace the @page with @control and all should be good.

Now when you know the type of page/control you need in the content area
simply load the control and use it as if if were a page. Now in reality
this approach does not need to use master pages. You simply define a page
(which is your master) and a placeholder to hold the usercontrol (like a
content holder).

You have to remember to load the control in the page_init phase of the
lifecyle. You can keep the type of control in session.

Hope this helps
Lloyd Sheen
 

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top