UpdatePanel

UpdatePanel

am 31.01.2008 22:22:17 von Rodrigo Ferreira

How do i load a page inside a UpdatePanel?

Thanks!

Re: UpdatePanel

am 31.01.2008 23:45:44 von 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?


--
Hope this helps,
Mark Fitzpatrick
Microsoft MVP - Expression



"Rodrigo Ferreira" wrote in message
news:OeDYM9EZIHA.1132@TK2MSFTNGP06.phx.gbl...
> How do i load a page inside a UpdatePanel?
>
> Thanks!
>

Re: UpdatePanel

am 01.02.2008 00:47:26 von Courtney

"Mark Fitzpatrick" wrote in message
news:4036867F-83C2-4A65-9EFD-AF54F94091FF@microsoft.com...
> 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?
>
>
> --
> Hope this helps,
> Mark Fitzpatrick
> Microsoft MVP - Expression
>
>
>
> "Rodrigo Ferreira" wrote in message
> news:OeDYM9EZIHA.1132@TK2MSFTNGP06.phx.gbl...
>> How do i load a page inside a UpdatePanel?
>>
>> Thanks!
>>
>

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