protected void btnUniversityCategoryName_Click(object sender, EventArgs e) { try { var errMsg = ""; var i = new Common().UpdateUserStatus(Convert.ToInt32(hndCollegeBranchId.Value), out errMsg, LoggedInUserId, Convert.ToBoolean(rbtLoginStatus.SelectedValue)); var collegeDtaa = new Common().GetCollegeuserDetails(Convert.ToInt32(hndCollegeBranchId.Value)); if (Convert.ToBoolean(rbtLoginStatus.SelectedValue)) { if (collegeDtaa.Rows.Count > 0) { var objMailTemplete = new MailTemplates(); var userData = UserManagerProvider.Instance.GetUserListById(Convert.ToInt32(Convert.ToInt32(hndCollegeBranchId.Value))); var objMail = new MailMessage { From = new MailAddress(ApplicationSettings.Instance.Email), Subject = collegeDtaa.Rows[0]["AjCollegeBranchName"].ToString() + " College Verification Mail By AdmissionJankari.com" }; var url = "<a href=" + Utils.AbsoluteWebRoot + "account/college-login" + ">College Login</a>"; var mailbody = objMailTemplete.MailToCollegeForRegisterationVerification( userData.First().UserFullName.Trim(), collegeDtaa.Rows[0]["AjCollegeBranchName"].ToString(), userData.First().UserEmailid.Trim(), userData.First().MobileNo.Trim(), url); objMail.Body = mailbody; objMail.To.Add("*****@*****.**"); objMail.IsBodyHtml = true; Utils.SendMailMessageAsync(objMail); } } if (!string.IsNullOrEmpty(txtCollege.Text.Trim())) { SearchByCollegeName(); } else { BindRegisteredCollege(0); } lblErrMsg.CssClass = "success"; lblErrMsg.Text = collegeDtaa.Rows[0]["AjCollegeBranchName"].ToString() + " college status updated successfully"; } catch (Exception ex) { var err = ex.Message; if (ex.InnerException != null) { err = err + " :: Inner Exception :- " + ex.ToString(); } const string addInfo = "Error while executing RptCollegeListItemCommand in AdminPanel/UpdateCollegeRegisterationStatus.aspx.cs :: -> "; var objPub = new ClsExceptionPublisher(); objPub.Publish(err, addInfo); } }