This works for me... or is this what you used?
/// <summary>
/// Fixes AJAX error when you click "Export to Excel" after you've made a previous AJAX callback
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void egv1_OnPreRender(object sender, EventArgs e)
{
registerPostBack();
}
private void registerPostBack()
{
System.Collections.Generic.IList<Control> list = FormUtil.FindControls(EntityGridView1, "lnkExport");
if (list.Count > 0)
{
LinkButton lnkExport = list[0] as LinkButton;
ScriptManager sm = ScriptManager.GetCurrent(this.Page);
if (sm != null)
sm.RegisterPostBackControl(lnkExport);
}
}
I'm outside ur box, shiftin' ur paradigm.