Click to See Complete Forum and Search --> : Update panel and Resepons.Redirect


shuvo
May 2nd, 2010, 11:51 PM
I need to execute Updatepanel.update and then response.redirect in the same button_click event. I find that page is redirected, but the content in the update panel is not saved.In many forums, solution is given as doing postback on the updatepanel using Javascript, but haven't been able to establish it. Anyone has any tips or example of how to update Updatepanel and redirect page in the same go?

dannystommen
May 3rd, 2010, 02:41 AM
I find that page is redirected, but the content in the update panel is not saved.

The update method of the UpdatePanel updates (refresh) the panel, it's not saving any data like a SqlDataSource. Or what exactly do you mean with 'the update panel is not saved'?

shuvo
May 3rd, 2010, 02:55 AM
Update panel doesn't refresh, means UpdatePanel.Update method doesn't accomplish the desired tasks.

dannystommen
May 3rd, 2010, 03:47 AM
How can see if it doesn't refresh if you have a Response.Redirect in the same button click event?

shuvo
May 3rd, 2010, 03:52 AM
UpdatePanel.Update should update the contents inside the panel like save commands for any text control, so if we come back to that page, we would find that the latest content on that text control is not retained, but if we don't redirect from the the page finish the event on updatepanel.update(), then everything is saved.