开发者

Gridview loses its viewstate

In a page, i put a gridview with several template field columns. In one of the template field, i have a linkbutton. Before postback i bind the grid with data. Once page loads, when i click the linkbutton in g开发者_运维知识库ridview, it is not firing the related event and its return a empty aspx page.


It sounds like you're not checking for a PostBack before running a DataBind(). If you continually bind your data, ViewState will be recreated each time and you'll lose what you had.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜