views:

595

answers:

2

I have an ASP.Net page that is contained within an iframe the page has an update panel, that, in isolation, works however when the page is within the iframe, the update panel always produces a full postback. I guess that the problem is the iframe itself but id like to know

a) why it doesnt work b) if there is a solution beyond rolling my own controls and writing a whole load of js

EDIT

ok its ASP.Net 2.0 and the 1.0 toolkit the page broadly looks like this (Note for the pedants i haven't closed tags, this is just to show the basic structure)

Main Page
Form
     table 
         td 
             iFrame 
                ! -- contained page --
                 Form 
                     asp:ScriptManager  
                         asp:UpdatePanel 
                               asp:Repeater
+1  A: 

I have been using some of my pages in IFrames using UpdatePanel, and they DO NOT produce any full page postbacks.

Can you describe the whole setup in more detail?

EDIT: Hmmm. The setup looks OK. Did you check whether the control which triggers the postback is placed inside the panel? Also, did you check for JS errors occuring before the ajax request fires?

Kirtan
ive added some shell of what that page looks like structure-wise, sorry for the lame formatting but the editor doesnt like html tags
Matt
Hi, i think its the structure of what im doing, i have a button in the footer template of a repeater (which is in an ascx) when i click that button the whole thing refreshes, if i place a separate button and label in a separate updatepanel and just change the text of the label by clicking the button, that works fine so it must be the button being in the repeater footer that is causing the issue. +1 for sticking around to read my edit ;)
Matt
A: 

Today I came across the same problem (trying to load gridviews asynchronously): A postback inside an iframe would reload the whole page, and ignore the postback event handler.

My solution was to use UFRAME.

devio