This is a migrated thread and some comments may be shown as answers.

HELP - New to .NET ----Show Profile Message every 30 days!

1 Answer 50 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Webtec
Top achievements
Rank 1
Webtec asked on 06 Apr 2011, 05:25 PM
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");
                }
}

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 07 Apr 2011, 03:46 PM

Hi Paul,

As far as I understand your issue you need to call a non-closable RadWindow only from a certain page, which has a master page. You should  do that form this particular page (either from the server, or from the client) in spite of using the master page (this will cause every content page to execute the code which is what you report). This is a general ASP.NET scenario and is generally not related to the RadWindow.

In case I have misunderstood you or you need further assistance please open a support ticket and send a small reproduction demo with detailed explanation of the difficulties you have opening the RadWindow and setting its properties.



Kind regards,
Marin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Webtec
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or