Click here to Skip to main content
15,900,907 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a page which contains a gridview and a bindgridview() method .When i click print button on this page ,it will pop up a report in popup.Once the report is popped up ,I want to call the bindgridview() method again.How can i do this...?Please help me..
Thanks in advance
Posted

1 solution

You can't. BindGridView happens on the server. You need to refresh the page or get the data via an AJAX call if you want to update the data. You can't call a server method from the client, obviously.

Your code that shows the popup, can make an AJAX call to update data on the main page in the same method.
 
Share this answer
 
Comments
Saneesh PK 13-Dec-12 5:47am    
Thanks for your reply Christian Graus....
//You need to refresh the page// How can i refresh the main page without using AJAX..?Is that possible...??
Christian Graus 13-Dec-12 14:06pm    
You can write javascript to refresh the page or point it back to itself, or to call the methods in ASP.NET that create a postback. If you have a button that does it, you can call it's click() method and let the framework handle the rest.
Christian Graus 13-Dec-12 14:06pm    
FYI, a vote of 1 is a vote to say my answer was bad. A 5 vote would say it was good.

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