Thursday, July 9, 2015

If you undertake a Response.Redirect at a web form's OnInit event the Page_Load event is nonetheless going to run before the redirect even though that will happen downstream sequentially speaking.

Hence, if you are trying to do this in the name of sanity checking if the state exists to even display a web form's contents, you may need to wrap the guts of the Page_Load event in a try/catch or some other safeguard of the like.

Addendum 7/20/2015: The fix for this might be this.

No comments:

Post a Comment