Alert User to change password.


I am using SQL2005 n .Net 3.5

I have a field in my table as Updatedate which contain last update date of the password.

Now I want to force user to change his password after 60 days.Before this,I want to remind him for the password change from 54th day.

6 days left.
55th day 5 days left
60 th day.0 days left and now you have to change the password.

How to do this?
Who is Participating?
havj123Connect With a Mentor Commented:
Either try this in code behind.
Just take the date value from updatedate field. Take days from the Date. Subtract it from Current date.

Then check it the number of days is greater than 53.
if(dt >53)
     int days = 60 - dt;
     label1.text = days + "days left";
create a stored procedure to control the password expiration and prepare your massages. In your application do always call this procedure while user login in as the first job. And take the required steps that neede to do...
rajputamitdAuthor Commented:
Can you guide me or show an example how to write such store procedure.
Thank u.
rajputamitdAuthor Commented:
Thanks 4 ur reply.I'll try it later n let you know.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.