protected void btnCurrdate_Click(object sender, EventArgs e) { try { DateTime datetimeoffset = DateTime.ParseExact(hfCurrdate.Value.Substring(0, 24), "ddd MMM d yyyy HH:mm:ss", CultureInfo.InvariantCulture); byte[] time = BitConverter.GetBytes(DateTime.UtcNow.ToBinary()); byte[] key = Guid.NewGuid().ToByteArray(); token = Convert.ToBase64String(time.Concat(key).ToArray()); MsgId = secBLLUser.SendResetPswdlink(Session["UserInfo"].ToString(), Session["UserEmail"].ToString(), "ResetPaswd", token, datetimeoffset); strResult = "success"; if (!String.IsNullOrEmpty(MsgId.ToString()) && MsgId > 0) { ScriptManager.RegisterStartupScript(this, this.GetType(), "Alert", "GetAlert('" + strResult + "');", true); } else { strResult = "error"; ScriptManager.RegisterStartupScript(this, this.GetType(), "Alert", "GetAlert('" + strResult + "');", true); } } catch (Exception ex) { LError.LogError("GTKSSO.UI.ForgotPassword", "btnNext_Click", ex.Message.ToString().Replace("\r\n", ""), Session["UserInfo"].ToString(), true); } }