开发者

Page double refresh

I'm developing a Facebook application. Which is a usual aspx page with a datagrid and a label. When I open the application on Facebook and click on the select button of any row of the grid, page load and "SelectedIndexChanged" server events are called as expected. I am writing a cell value of the selected row, to the label in "SelectedIndexChanged" event. The code behind runs as expected. But after that, Facebook trying to reload the page (calls the page again?). This causes loss of the viewstate (selected row index and label text that set in button click event)

This is weird. A开发者_如何学运维ny help would be appreciated.

Regards, Baris


I solved this. It was my fault. auth.Authorize() was placed in Page_Load. It was called at all page post backs. Therefore the page was reloading. I wrapped this in if(!Page.IsPostBack) and this solved the problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜