Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
iam having page that have button when i click that button i dir page in iframe
i do some work on page 2
i need when i click button save in page 2
close iframe page 2 && take the values i generate from page2 to controls on page 1
Posted

You need to explain your question more..
As per title of question, You can call any pages public methods from any other pages.Because page class are <code>partial classes</code>.

But its not a good programming practice.

for ex.
_Default defaultPage=new _Default();
defaultPage.myPublicFunction();
 
Share this answer
 
Comments
[no name] 29-Aug-11 17:57pm    
in page1 i have gridview
i open page2 in i iframe
i make search in page2 when i click the button on page 2 iwant search result to be added to gridview on page1
use Session like this

in the button in page2 write :

Session["Go"] = "the info";
Response.Redirect("~/Default1.aspx");


in PageLoad in page1 write :

TextBox1.Text =  Session["Go"].ToString();
 
Share this answer
 
v2
Comments
[no name] 30-Aug-11 2:12am    
i open page 2 in iframe as popup window
so i can't response.redirct to page 2 becuase it's alreay opend

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