Click here to Skip to main content
15,900,818 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have two .aspx pages viz.
(1)Parent.aspx
(2)Child.aspx

Parent.aspx has a gridview with 'AutoGenerateSelectButton=true'.Data is binded from code behind on page load.

Child.aspx is actually a pop-up which gets opened from Parent.aspx's gridview's selected index changed event.
Below is the code to open on Gridview selected index changed
C#
ScriptManager.RegisterClientScriptBlock(this, typeof(System.Web.UI.Page), "OpenChildWindow", "ADDRESS_POP_UP();", true);



JavaScript
var retVal;
function ADDRESS_POP_UP()
 {
  retVal = window.showModalDialog("Child.aspx",'Show Popup  Window','dialogHeight=1500px;dialogWidth=1500px;resizable=no;center=yes;fullScreen=yes');
                       window.location="Parent.aspx";
            
  }

Code executes very well.The data from parent is passed to child and data is binded from parent form to child form .Then I close the child form and again click on parent forms another row of the same gridview,at that time child form is called but the previous data is not cleared.The child form is not rebinded with the new values.

why is it so?
Any idea.Kindly help.

Thanks.
-Hemant
Posted
Updated 28-Oct-12 19:07pm
v3
Comments
govardhan4u 22-Oct-12 8:01am    
did you try with child page_load?
Sergey Alexandrovich Kryukov 22-Oct-12 13:50pm    
If could not possibly be "ShowModelDilog". Please understand that right spelling is a mere politeness, and the wrong is... hope you got it.
Do you have a problem with Copy/Paste? :-)
--SA

It's not happened to me any way clear all fields before closing the child popup.
 
Share this answer
 
This problem was solved by changing to the following IE8 settings
-> Internet Options -> General -> Browsing History -> Settings -> Temporary Internet Files ->'Every time I visit the web page'
 
Share this answer
 
You could also make sure the call to Child.aspx is always unique


JavaScript
var retVal;

function ADDRESS_POP_UP()
 {
var d=new Date();
  retVal = window.showModalDialog("Child.aspx?d=" + d,'Show Popup  Window','dialogHeight=1500px;dialogWidth=1500px;resizable=no;center=yes;fullScreen=yes');
                       window.location="Parent.aspx";

  }
 
Share this answer
 
Place the below code in the child Pageload event.

VB
Response.ExpiresAbsolute = DateTime.Now.AddDays(-1D)
Response.Expires = -1500
Response.CacheControl = "no-cache"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900