I have a ASP.NET website that allows the user to stay logged in for an indefinite time. I am trying to show a certain page or non closable rad window etc. every 30 days. Right now I put the code below in my Master Page. The problem is that this runs on every page and I am sure there is a better way to do this. I would redirect them to a page that checked this on login but they do not login for each visit. I thought there may be a way to use the Global.asax page. Any thought would be greatly appreciated.
if( !IsPostBack) { // Show Must Read Message When Profile Message Column is set to "Show" if (Profile.Message == "Show") { Response.Redirect("~/xProfileMessage.aspx"); } // Show Update Profile Page Every 30 days int DaysSinceProfileUpdate = (DateTime.Now - Profile.LastUpdatedDate).Days; if (DaysSinceProfileUpdate > 30) { Response.Redirect("~/xEditProfileAuto.aspx"); }}