Ajax UpdatePanel as Source for IFrame

J

jacoberg2

I'm new to ASP.NET and I was curious about some strange behavior that
i have witnessed in a page I made.

I created some nested repeaters to display some data and a dropdown
list and wrapped them in an UpdatePanel on one page:

<asp:ScriptManager1>
</asp:ScriptManager1>
<asp:UpdatePanel1>
<ContentTemplate>
<asp:dropdownlist1>
<asp:Repeater>
<asp:Repeater>
<asp:Repeater>
....
</ContentTemplate>
</asp:UpdatePanel1>

When I load this as a stand alone page, just by calling the path in
the browser, the ajax works perfectly for all the postbacks. Meaning
the links in the repeaters that open the nested repeaters do not
refresh the page.

When i set this page as the source for an iframe in another page, the
only control that performs postback without refreshing the whole page
is the dropdownlist. When i click the links in the repeaters, the page
refreshes. Does anyone have any idea why the behavior would change so
much just by loading it in an iframe? Thanks for any help you can give
me!

Jacob
 
M

Marc

jacoberg2 said:
I'm new to ASP.NET and I was curious about some strange behavior that
i have witnessed in a page I made.

I created some nested repeaters to display some data and a dropdown
list and wrapped them in an UpdatePanel on one page:

<asp:ScriptManager1>
</asp:ScriptManager1>
<asp:UpdatePanel1>
<ContentTemplate>
<asp:dropdownlist1>
<asp:Repeater>
<asp:Repeater>
<asp:Repeater>
...
</ContentTemplate>
</asp:UpdatePanel1>

When I load this as a stand alone page, just by calling the path in
the browser, the ajax works perfectly for all the postbacks. Meaning
the links in the repeaters that open the nested repeaters do not
refresh the page.

When i set this page as the source for an iframe in another page, the
only control that performs postback without refreshing the whole page
is the dropdownlist. When i click the links in the repeaters, the page
refreshes. Does anyone have any idea why the behavior would change so
much just by loading it in an iframe? Thanks for any help you can give
me!

Never heard of this before....! Are you sure it's not reloading the page
when you view it normally?
A way to test this in IE and Firefox is to navigate to the page, clear the
address bar and then click whatever it is you need to click.
If the address bar gets filled back up with your URL, then a full page post
back is occurring. Otherwise it's using XMLHTTPRequest.
Another possibility is that the pages are on different domains and your
browser's security settings are disabling JavaScript... unlikely but a
possibility.

Marc
 

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

Top