GridView paging - Invalid postback or callback argument

  • Thread starter Thread starter Iain
  • Start date Start date
I

Iain

All,

I bind to a GridView on the Page_Load event.

Occasionally when clicking any of the pages within the grid the
following error appears :

"Invalid postback or callback argument."

Ideas/suggestions welcome

Ian
 
All,

I bind to a GridView on the Page_Load event.

Occasionally when clicking any of the pages within the grid the
following error appears :

"Invalid postback or callback argument."

Ideas/suggestions welcome

Ian

It might be that you call DataBind before the paging event is raised.
Check if you didn't forget if (!Page.IsPostBack) before that call

e.g.

protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
....
DataGrid1.DataBind();
....
 
Back
Top