Use
PageIndexChanged
Event instead of
PageIndexChanging
Event.
And no need to use string buider to append the script tags.
Just the JavaScript code will do.
protected void grdArchive_PageIndexChanged(object sender, EventArgs e)
{
System.Web.UI.ScriptManager.RegisterStartupScript(this, this.GetType(), "ajax_client_script", "window.scrollTo(0,0);", true);
}
Try this and let me know.
Thanks...