Code for this is below:-
protected void Page_Init(object sender, EventArgs e)
{
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now.AddSeconds(-1));
Response.Cache.SetNoStore();
Browser.ClearBrowserData();
Page.ViewStateUserKey = Session.SessionID;
Response.Cache.SetValidUntilExpires(true);
}
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
if (Session["trainingpartnercode"] != null && Session["trainingpartnercode"].ToString().Length > 1)
{
try
{
}
catch (Exception ee)
{
ExceptionHandler.WriteException(ee.Message);
}
Response.Redirect("InvoiceInbox.aspx");
}
else
{
try
{
}
catch (Exception ee)
{
ExceptionHandler.WriteException(ee.Message);
}
Response.Redirect("~/Login.aspx?errormessage=No valid session found", false);
}
No comments:
Post a Comment