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.
精彩评论