Two small problems with DataGrid default paging mode
1. There is a viewstate, determined by the amount of data in your table, and the general situation is large.
So change the viewState to generate HyperLink mode on OnItemcreated, avoiding the above two questions
<% @ Import Namespace = "System.Data"%> <% @ Import Namespace = "System.Data.SqlClient"%>