When AJAX ScriptManager is on MasterPage
ScriptManager ScriptManager1 = (ScriptManager)Master.FindControl("ScriptManager1");
ScriptManager1.AsyncPostBackTimeout = 300;
..or a much beter way:
ScriptManager ScriptManager1 = ScriptManager.GetCurrent(this);
suggested by rajbk