Salva,
These are just some guesses...
http://www.highdots.com/forums/archi.../t-704364.html. This
suggest using smartnavigation but there are known issues with that so be
aware.
Or try:
http://www.4guysfromrolla.com/webtec...ner/faq3.shtml which talks
about the Response.Buffer property
HTH, Dave.
"Salvador" wrote:
> Hi,
>
> I have a wierd situation on my website, can anyone help me?
>
> Scenario:
> I have a page that depending what parameter receives loads one usercontrol
> or other one.
>
> Problem:
> Sometimes when I click the link that goes to that page the page suddenly
> appears with the wrong usercontrol and then flicks to the correct one, it
> seems that is responding with the cache but after the execution shows the
> correct one.
>
> Generic code:
>
> private MyUserControl Control1;
> private MyUserControl2 Control2;
> private TableCell Content;
>
> On_Load()
> {
> Content.Controls.Clear();
>
> if (MyCondition)
> {
> Control1 = (Control1) LoadControl ("MyUserControl.ascx");
>
> Content.Controls.Add(Control1);
> }
> else
> {
> Control2 = (Control2) LoadControl ("MyUserControl2.ascx");
>
> Content.Controls.Add(Control2);
> }
> }
>
> I have not change the ASPX Page, so it has its default configuration, no
> caching specified, only AutoEventWireup = "false"
>
> Any ideas why is this happening? Is there any way to force the page not to
> render until all the server code is executed?
>
> Thanks a lot
> Salva
>
>
>
>
>
>
> --
> Salvador
>