Click here to Skip to main content
15,891,033 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
For Expire Date. If date come to expire then before 1 week system should give Alert message.
Posted

1 solution

try this

in login.aspx => page_load

C#
//global declaration

public static string d1 = DateTime.Now.ToString("dd");
public static string d2 = DateTime.Now.AddDays(8).ToString("dd");

    //page_load
    int span = Convert.ToInt32(d2) - Convert.ToInt32(d1);

    if (span == 8)
    {
        ScriptManager.RegisterStartupScript(Page, this.GetType(), "alert", "window.alert('You have only one day to expire support');", true);
    }
    else
    {
        ScriptManager.RegisterStartupScript(Page, this.GetType(), "alert", "window.alert('You have expire support of this contract');", true);
        return;
    }
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900