468,117 Members | 1,487 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,117 developers. It's quick & easy.

IFrame Page_Load multiple time

Hello

I have a default.aspx page with which has an iframe.

In the code-behind of the default.aspx page it loads the 'src'
attribute of the iframe.

The iframe loads another aspx page, but when it loads the Page_Load
method is called multiple times. In some situations the page is
called twice and in others it is called 4 times.

any ideas what might be going on here.

Thanks,
Matt
Nov 18 '05 #1
2 3871
magister wrote:
Hello

I have a default.aspx page with which has an iframe.

In the code-behind of the default.aspx page it loads the 'src'
attribute of the iframe.

The iframe loads another aspx page, but when it loads the Page_Load
method is called multiple times. In some situations the page is
called twice and in others it is called 4 times.

any ideas what might be going on here.


Sure, you might have AutoEventWireup set to true, in which case it runs
Page_Load because it's an event handler, and then it runs it again
because it's called "Page_Load".

Nov 18 '05 #2
Thanks for your reply,

Nope AutoEventWireup="false" and Page_load event wired only once in

private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
}

However turning off smartnavigation in the page hosting the IFrame
sorted this one out...

Bummer, I wanted to use smartnav...

"Ryan Walberg, MCSD for .NET" <rw******@nospam.mts.reallynospam.net> wrote in message news:<#f*************@TK2MSFTNGP09.phx.gbl>...
magister wrote:
Hello

I have a default.aspx page with which has an iframe.

In the code-behind of the default.aspx page it loads the 'src'
attribute of the iframe.

The iframe loads another aspx page, but when it loads the Page_Load
method is called multiple times. In some situations the page is
called twice and in others it is called 4 times.

any ideas what might be going on here.


Sure, you might have AutoEventWireup set to true, in which case it runs
Page_Load because it's an event handler, and then it runs it again
because it's called "Page_Load".

Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by nightstar | last post: by
3 posts views Thread by Stevie_mac | last post: by
1 post views Thread by Rhys | last post: by
2 posts views Thread by Jeronimo Bertran | last post: by
3 posts views Thread by Timo | last post: by
reply views Thread by Chukka | last post: by
5 posts views Thread by Chamnap | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.