if(Session["USERID"] == null) { Response.Redirect("Logon.aspx?ReturnTo=" + PageName + ".aspx"); }to
if(common.IsNull(Session["USERID"])) { Response.Redirect("Logon.aspx?ReturnTo=" + PageName + ".aspx"); }My spurious redirects have disappeared. It seems a little weird to me - sometimes the compiler warns you you cannot compare to null, other times it lets the comparision slide right on by.