protected void btnOk_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txtUserName.Text) && !string.IsNullOrEmpty(txtPassword.Text)) { BLL.PersonBiz biz = new BLL.PersonBiz(); var res = biz.UserAuthen(txtUserName.Text, txtPassword.Text, false, ""); if (res.IsError) { UCModalPopupError.ShowMessageError = res.ErrorMsg; UCModalPopupError.ShowModalError(); UpdatePanelForgetPassword.Update(); return; } else { if (ViewState["filepath"] != null) { Response.Redirect(String.Format("~/UserControl/ViewFile.aspx?targetImage={0}", CryptoBase64.Encryption(ViewState["filepath"].ToString()))); } return; } } else { UCModalPopupError.ShowMessageError = SysMessage.PleaseInputFill; UCModalPopupError.ShowModalError(); UpdatePanelForgetPassword.Update(); } }