How to refresh the ASP.Net page after asynchronously updating the contents of page
-
Hi All, I am working on a ASP.Net web application wherein I am calling a class method Asynchronously to get the data from data base (using AsyncCallback) on page load. after the completion of this callback method raises an event. I'm handling the event on the asp.net page wherein I'm assigning the datasource to a grid view. Everything is going good except for the page is not getting refreshed after the event is getting fired. I have checked the datasource of the grid is assigned properly but the contents are not shown on the page. Please Note: I'm calling the method Asynchronously so after the event is fired and after assigning the data source to the grid and after data binding it i want to post back the page to the server so that the latest contents of the page are visible on the page. I want to refresh the entire page on that event. Please help its Urgent Thanks and Regards Paramhans
-
Hi All, I am working on a ASP.Net web application wherein I am calling a class method Asynchronously to get the data from data base (using AsyncCallback) on page load. after the completion of this callback method raises an event. I'm handling the event on the asp.net page wherein I'm assigning the datasource to a grid view. Everything is going good except for the page is not getting refreshed after the event is getting fired. I have checked the datasource of the grid is assigned properly but the contents are not shown on the page. Please Note: I'm calling the method Asynchronously so after the event is fired and after assigning the data source to the grid and after data binding it i want to post back the page to the server so that the latest contents of the page are visible on the page. I want to refresh the entire page on that event. Please help its Urgent Thanks and Regards Paramhans
Paramhans Dubey wrote:
Please help its Urgent
Don't be rude. It may be urgent to you but not anyone else here. I think you are little confused about how to process the page. If you want the entire page to refresh with the data then do a postback. If you want to load the data asynchronous then use something like an UpdatePanel or AJAX methods.
I know the language. I've read a book. - _Madmatt
-
Paramhans Dubey wrote:
Please help its Urgent
Don't be rude. It may be urgent to you but not anyone else here. I think you are little confused about how to process the page. If you want the entire page to refresh with the data then do a postback. If you want to load the data asynchronous then use something like an UpdatePanel or AJAX methods.
I know the language. I've read a book. - _Madmatt
Mark Nischalke wrote:
Don't be rude. It may be urgent to you but not anyone else here.
If asking for help is rudeness then I am sorry for being rude. My question is that is is there any way to post back the entire page to the server without using Update Panel.
-
Mark Nischalke wrote:
Don't be rude. It may be urgent to you but not anyone else here.
If asking for help is rudeness then I am sorry for being rude. My question is that is is there any way to post back the entire page to the server without using Update Panel.
Paramhans Dubey wrote:
If asking for help is rudeness
Asking for help is not rude. Asking an URGENT response is.
Paramhans Dubey wrote:
is there any way to post back the entire page to the server without using Update Panel.
:rolleyes: Yes, of course there is, that is how ASP.NET works. Perhaps you need to restate your question.
I know the language. I've read a book. - _Madmatt
-
Paramhans Dubey wrote:
If asking for help is rudeness
Asking for help is not rude. Asking an URGENT response is.
Paramhans Dubey wrote:
is there any way to post back the entire page to the server without using Update Panel.
:rolleyes: Yes, of course there is, that is how ASP.NET works. Perhaps you need to restate your question.
I know the language. I've read a book. - _Madmatt
Mark Nischalke wrote:
Asking for help is not rude. Asking an URGENT response is.
let's finish this here. I apologize for being rude. and also i restate my question: I have a long running procedure which takes approx. 1 mins to complete. I am calling the method using a delegate and ICallBack. When my process completes the it raises an event which is handled on UI wherein I am assigning the datasource to grid but as this is a asynchronous update the updates are not visible on the Page. I cant use Update panel in my project. My question is that is is there any way to post back the page to the server without using Update Panel after asynchronously updating the page to show the updated contents.
-
Mark Nischalke wrote:
Asking for help is not rude. Asking an URGENT response is.
let's finish this here. I apologize for being rude. and also i restate my question: I have a long running procedure which takes approx. 1 mins to complete. I am calling the method using a delegate and ICallBack. When my process completes the it raises an event which is handled on UI wherein I am assigning the datasource to grid but as this is a asynchronous update the updates are not visible on the Page. I cant use Update panel in my project. My question is that is is there any way to post back the page to the server without using Update Panel after asynchronously updating the page to show the updated contents.
You can cause a postback from JavaScript, plenty of examples for that. However, what will you gain? You will postback, causing the grid to rebind, causing your callback to launch, causing you to enter an infinite loop. What you need to do is parse the data on the client, something like this, http://msdn.microsoft.com/en-us/magazine/ee309508.aspx[^]. Is there a valid reason to not use UpdatePanel?
I know the language. I've read a book. - _Madmatt
-
Mark Nischalke wrote:
Asking for help is not rude. Asking an URGENT response is.
let's finish this here. I apologize for being rude. and also i restate my question: I have a long running procedure which takes approx. 1 mins to complete. I am calling the method using a delegate and ICallBack. When my process completes the it raises an event which is handled on UI wherein I am assigning the datasource to grid but as this is a asynchronous update the updates are not visible on the Page. I cant use Update panel in my project. My question is that is is there any way to post back the page to the server without using Update Panel after asynchronously updating the page to show the updated contents.