LinqDataSource and EnableViewState = false problem

1 posts, 0 answers
  1. martijnb
    martijnb avatar
    3 posts
    Member since:
    May 2007

    Posted 26 Jul Link to this post

    Today I ran into an issue with a grid that is linked to a LinqDataSource via DataSourceId and no ViewState.

    Initially, everything works fine but after a postback (paging, sorting, filtering), the Selecting event of the LinqDataSource is fired twice, once before page_load and once after. The problem is that this will cause an expensive query to run twice.

    Anybody experienced this problem? With ViewState enabled, everything works fine.

    Thanks, Martijn

Back to Top