.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Melody Anderson
Post New Web Links

ModalPopupExtender and IFrame problem

Posted By:      Posted Date: October 13, 2010    Points: 0   Category :ASP.Net

Here is my problem, please give your suggestion:

I have product list on parent page in grid view. When user click on insert new product button, the modal popup will display. Modal popup has <asp:panel>. In asp:panel, I have IFrame for AddProduct.aspx page.

1) I can add, modify or delete the product on modal popup(AddProduct.aspx) but when I close the popup window, I want the product list on parent page should be refresh. So we can see updated data.

2) Right now, I am using static IFrame src="AddProduct.aspx" but I want to pass the selected product ID from parent Grid view using query string like src="AddProduct.aspx?ProductID=20".

Please guide me how to do this?? Thank you.

View Complete Post

More Related Resource Links

iframe and setfocus problem


I have a page with an iframe on it in which I load another page.
On this iframe page I have some textboxes above eachother.

When the first textbox is filled with a code the textchanged event is called 
and the code is checked with the database.
After the code has been changed to the right one (if needed) I want the 
focus to go to the next textbox.

So at the end of the event I do: Page.SetFocus(txtbox2)

But after the postback refresh, the focus is gone.
I have also put the control to be focussed in a session variable and then in the page_load event I set the focus to the control in the session variable, but still no focus on the textbox.
How can I put it on the 2nd textbox? 
all is done in the Iframe page codebehind.
I need this focus because the two textboxes are filled via bar code reader and after the scan an "enter press" is done automatically and to be able to allow two scans after each other this focus change is needed.

Reload IFrame+ModalPopUpExtender Content

Hi all, I have a small issue with ModalPopupExtender. It opens in an Iframe initially, and shows the page: add_contact.aspx After I have entered the contact details, the IFrame redirects to the contact_details.aspx page to show what I have loaded. The problem is when I close that modalpopup-window and click again to show the modalpopup, the iFrame shows the contact_details.aspx page, and not the add_contact.aspx page. Anyways, I can resolve this, without using modalPopup.show() in code behind? Thanks

ModalPopupExtender hides behind iFrame

I am working with .Net 2.0 using Visual Studio 2005 and the corresponding AjaxControlToolkit .  I have a master page with a ModalPopupExtender that appears some number of seconds before the browser session times out.  Everything works perfect, except for one condition.  One of the web pages has an iFrame used to display a PDF.  If the user is on this page and the modal popup is displayed, the modal popup hides behind the iFrame and the user cannot see it. I have seen a few posts regarding this issue, but no resolution.  Maybe the problem is fixed in .Net 3.5 and above, but I cannot migrate to the newer version just yet, so resolving the problem as it is would be awesome and much appreciated!   Thanks.

Modalpopupextender problem



I have two modalpopupextenders in one aspx page . Both are binded with two different buttons. But the problem is when i m clicking  first button my first modalpopup is coming fine but on second button click the second modalpopup is not showing. i am not able to find where exactly the problem is.

Can anybody suggest any solution ???

how to clear iframe problem


my problem in this site


i require Login page opened in seprate window what id do

ModalPopupExtender problem with browser back button


ModalPopUpExtender shows popup when user clicks browser back button.

I saw this thread but I could find the solution for this problem.


mesajrapor1 is my user control which contains the modalpopupextender

Here is my code:


protected void DataList1_ItemCommand(object source, DataListCommandEventArgs e)
        HyperLink hyp = (HyperLink)e.Item.FindControl("hypGonderenAD");
        Label lblicer = (Label)e.Item.FindControl("lblIcerikMesaj");
        Label midlbl = (Label)e.Item.FindControl("lblIdMesaj");
        Label sidlbl = (Label)e.Item.FindControl("Label3");

        if (e.CommandName == "SikayetEt")
            mesajrapor1.RaporGonder(hyp.Text.ToString(), lblicer.Text.ToString(), Convert.ToInt32(midlbl.Text), Convert.ToInt32(sidlbl.Text));

Fundamental problem with ModalPopupExtender


I use a ModalPopupExtender within a User Control.  Under the first release of the AtlasControlToolkit everything was working perfectly.

When I installed the lastest verion of the tookit, the modal popup started acting strange.  Instead of being centered on the page, it was shifted down and to the right.

Obviously that's what happens when the code thinks the parent containiner in DOM in something other than the body.

I used Beyond Compare to compare the old Modal Popup code to the new code, and found there were some JavaScript changes, so I first eliminated that as a problem by reverting to the old version's JS file.  It did not have an effect.

There seems to be no changes at all in the .NET code for ModalPopup, so I am left to assume that there was some change made to AtlasControlExtender that is causing the problem.

If I had access to the AtlasControlExtender code, I would recommend a change here, but I don't have access.  Is MS going to release that code at some point?

I have created a complete test page (below) that demonstrates the problem in action.  If you include the new AtlasControlToolkit (6/26/2006), it will exhibit the problem.  If you swap in the old toolkit binaries, it will work as it should (covering and centering on the whole page).

If a MS developer looks at this (I hope y

Problem on loading sharepoint pages in Iframe.


Hi All,


I am using WSS 3.0.

I have 2 sharepoint application pages. ie, the pages A(http://site1.com/A.aspx) and B(http://site2.com/B.aspx).During the page load of A, we create an iframe and load the page B on it.  But it does not work, the login page shows in my iframe. These two pages may be in same domain. Is there any problem on loading sharepoint pages on iframe?


Please help me.


Thanks in Advance...


problem in dsiplaying pages inside iframe


hi all how are u?

before some days , i was able to display any facebook page inside IFRAME in Our Website,

but now i cannot ( Security issue).

any one know any solution for that?

we want to display Our FaceBook Pages inside Our website.

please help.

Problem with ConfirmBox and ModalPopupExtender



I have a modalpopupextender im my .net page.

                   <AJT:ModalPopupExtender ID="ModalPopupExtender1" runat="server" 
                    TargetControlID="BtnCancelar" PopupControlID="PanelMotivo" 
                    BackgroundCssClass="modalBackground" DropShadow="true"></AJT:ModalPopupExtender>                                           
                    <asp:Panel ID="PanelMotivo" runat="server" HorizontalAlign="Center" Height="100%" Width="400px" CssClass="modalPopup"  style="display:none">                           
                            <asp:Label ID="LblCancelamento" runat="server" ForeColor="White" 
                                Text="Indique o motivo do cancelamento:" 
                                style="color: #333333; font-weight: 700"></asp:Label>
                        <br />
                        <asp:TextBox ID="txtCancelamento" runat="server" CssClass="caixas" 
                            MaxLength="255" TextMode="MultiLine" Width="300px"></asp:TextBox>

Iframe problem



I am loading a page in a iframe.

<iframe src='http://www.xxxx.com/somepage' />

When I load this iframe in a page its not displayed. keep on redirecting.

If I visited the iframe url on first time then if i load the iframe then its loading. How to solve this problem ?

Please let me know if anyone help me on this.


Problem with Modal Window and Iframe


I have a web page with a link that opens a modal dialog.Im using ajax toolkit. Asp.net 2.0

On the web page I have an iframe displaying some content. When I click on the button to show the modal box it appears behind the iframe in some browsers. In IE 8 it show in front of the iframe. In others its located behind out of view.

How do I fix this so it always appears on top?

iframe Loading Image show problem


i am  loading a ifrmae when we click a button .i am require a loadimage.show when i frame laoding time and disapper when i frame loaded

Iframe / window.parent problem



I'm trying to make an ajax-enabled uploader so I'm using an Iframe to upload the image and the Iframe is embedded in an Update Panel which helps me prrevent a full page postback.

The problem is that from the Iframe, I have to call a script that clicks a button from the parent page  using the a ScriptManager's RegisterStartupScript attribute. The script "iFrame_OnUploadComplete()" clicks a button that uploads the file. I call the script from the Iframe like so:

 protected void btnUpload_Click(Object sender, System.EventArgs e)

ClientScript.RegisterStartupScript(Page.GetType(), "Upload Completed", "window.parent.iFrame_OnUploadComplete();", true);


The above method calls the parent page which helps save the uploaded file.

The above method works on my local host where I call Iframe URL from the parent page like so:

        <iframe src="http://localhost:4145/CustomControls/UploaderAssistant.aspx" >

This works perfectly on the local host.

But when we move to IIS, and we use an absolute domain name like so

        <iframe src="sub.domain.com/CustomControl

using AJAX Calendar and ModalPopupExtender controls inside iFrame


Dear All,

I am facing serious issue in iFrame, I used aspx page as a parent page and inside this parent page added the iFrame to load all other aspx pages as content, all my other pages containing AJAX Calendar and Model popup controls, I have break down below the issues which I am facing:AJAX Calendar control:
Not at all displaying or binding into text box with the iFrame, but without iFrame it works fine, any solution?
AJAX ModalPopupExtender:
It is popping inside iFrame, after reading lot of comments from our other friends I moved to parent page, but how can I call the ModalPopupExtender control from the page which is inside iFrame?
Please assist me on above concern TOP URGENT basis.



iframe model window problem


i am using the and model window



and demo



when we click on demo page i click outside the iframe

the iframe is close

what is the jquery  code for clicking  outside of the iframe then iframe is not close

and how can load iframe useing jquery ajex


Problem to group radio button across gridview rows

In general no one can easily group or make a single selection from radio button list inside gridview rows. There are a lot of way to make a single or unique selection from list. Here i want to share how i can address this problem in the most easiest way. Googling the problem most of the cases i saw the grouping in horizontal way. Thats why i tried to group the radio buttons in vertical manner. Let i have a requirement like below:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend