ASP.Net C# SetFocus / Page Cycle - Confusing Error

canon

New Member
Can anyone tell me why I would be getting the error in the below trace?"SetFocus can only be called before and during PreRender."The error message says that "SetFocus" must be called before or during PreRender and based on the trace the page has come nowhere near anything to do with PreRender yet. So why the error?Copied From Trace.axd ...Begin PreInitEnd PreInitBegin InitEnd InitBegin InitCompleteEnd InitCompleteBegin LoadStateEnd LoadStateBegin ProcessPostDataEnd ProcessPostDataBegin PreLoadEnd PreLoadBegin LoadEnd LoadBegin ProcessPostData Second TryEnd ProcessPostData Second TryBegin Raise ChangedEventsEnd Raise ChangedEventsBegin Raise PostBackEventSetFocus can only be called before and during PreRender. at System.Web.UI.Page.SetFocus(Control control) at System.Web.UI.Control.Focus() at Graylink.Neptune.RecruiterPortal.UserControls.Popups.RecruiterPopups.ShowChangePasswordPopup(RecruiterClass recruiter, String commandName) in C:\Users\jens.uffhaus\SourceControl\Neptune\Source Code\RecruiterPortal\UserControls\Popups\RecruiterPopups.ascx.cs:line 1134 at Graylink.Neptune.RecruiterPortal.Default.Password_OnBeforeGo(MenuItem item, String queryString, Boolean forceRedirect) in C:\Users\jens.uffhaus\SourceControl\Neptune\Source Code\RecruiterPortal\Default.Master.cs:line 92 at Graylink.Neptune.RecruiterPortal.MenuItem.GoDelegate.Invoke(MenuItem item, String queryString, Boolean forceRedirect) at Graylink.Neptune.RecruiterPortal.MenuItem.Go(String queryString, Boolean forceRedirect) in C:\Users\jens.uffhaus\SourceControl\Neptune\Source Code\RecruiterPortal\Menu\MenuItem.cs:line 129 at Graylink.Neptune.RecruiterPortal.MenuItem.Go() in C:\Users\jens.uffhaus\SourceControl\Neptune\Source Code\RecruiterPortal\Menu\MenuItem.cs:line 115 at Graylink.Neptune.RecruiterPortal.MainMenu.lnkMyAccountProfilePassword_Click(Object sender, EventArgs e) in C:\Users\jens.uffhaus\SourceControl\Neptune\Source Code\RecruiterPortal\UserControls\MainMenu.ascx.cs:line 130 at System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) at System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.LinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 
Back
Top