hi, I have developed website "Job requisition and Interview System". In this website I offer products for accessing resume of Job Seeker . After buying the product they can accesses resumes by activing status.After one month validity of product get over.And status become inactive.In this I did active status but how can I do inactive status after one month.
you can retrieve the Product Registration date then compare while accessing. have a look at the sample code
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If CheckIsValidUser() = False Then
Label1.Text = "Your Status is INACTIVE"
Else
Label1.Text = "Your Status is ACTIVE"
End If
End Sub
Private Function CheckIsValidUser() As Boolean
'
Dim RegisterDate As Date = Microsoft.VisualBasic.DateAdd(DateInterval.Month, -1, Date.Today).ToString
Dim ExpiryDate As String = Microsoft.VisualBasic.DateAdd(DateInterval.Month, 1, RegisterDate).ToString
If ExpiryDate.ToString = Date.Today.ToString Then
''Raise your exception
Return False
Else
Return True
End If
End Function Mark as solved if it helps !!!