protected void Page_Load(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Request.Params["nume"])) { var SqlDataSource1 = (SqlDataSource)LoginView1.FindControl("SqlDataSource1"); string q = Request.Params["nume"]; SqlDataSource1.SelectCommand = "SELECT [UserId], [UserName], [IsAnonymous] FROM [vw_aspnet_Users] WHERE [UserName] LIKE @q and [IsAnonymous] = 0"; SqlDataSource1.SelectParameters.Add("q", "%" + q + "%"); SqlDataSource1.DataBind(); var SqlDataSource2 = (SqlDataSource)LoginView1.FindControl("SqlDataSource2"); SqlDataSource2.SelectCommand = "SELECT [grup_id], [grupname] FROM [grupuri] WHERE [grupname] LIKE @q"; SqlDataSource2.SelectParameters.Add("q", "%" + q + "%"); SqlDataSource2.DataBind(); } else { var SqlDataSource1 = (SqlDataSource)LoginView1.FindControl("SqlDataSource1"); string q = ""; SqlDataSource1.SelectCommand = "SELECT [UserId], [UserName], [IsAnonymous] FROM [vw_aspnet_Users] WHERE [UserName] LIKE @q and [IsAnonymous] = 0"; SqlDataSource1.SelectParameters.Add("q", "%" + q + "%"); SqlDataSource1.DataBind(); var SqlDataSource2 = (SqlDataSource)LoginView1.FindControl("SqlDataSource2"); SqlDataSource2.SelectCommand = "SELECT [grup_id], [grupname] FROM [grupuri] WHERE [grupname] LIKE @q"; SqlDataSource2.SelectParameters.Add("q", "%" + q + "%"); SqlDataSource2.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) {// Method used to manipulate the master page buttons visibility if (Session["UsernameLogin"] != null && Session["UserType"] != null) { usernameLabel.Text = "Welcome back: " + Session["UsernameLogin"].ToString(); var testDiv1 = LoginView.FindControl("registerLink"); var testDiv2 = LoginView.FindControl("loginLink"); testDiv2.Visible = false; var testDiv3 = LoginView1.FindControl("logoutLink"); testDiv3.Visible = true; if (Session["UserType"].ToString() == "1") { TimetableLink.HRef = "~/ClientTimetable"; testDiv1.Visible = false; } else if (Session["UserType"].ToString() == "2") { TimetableLink.HRef = "~/StaffTimetable"; testDiv1.Visible = true; } } else { var testDiv1 = LoginView.FindControl("registerLink"); testDiv1.Visible = true; var testDiv2 = LoginView.FindControl("loginLink"); testDiv2.Visible = true; var testDiv3 = LoginView1.FindControl("logoutLink"); testDiv3.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { if (User.IsInRole("administrators")) { GridView UserGV = (GridView)LoginView1.FindControl("UsersGridView"); HtmlTable UserMG = (HtmlTable)LoginView1.FindControl("UserManage"); UserGV.DataSource = Membership.GetAllUsers(); UserGV.DataBind(); if (Page.IsPostBack) { UserMG.Visible = true; } } if ((!User.IsInRole("administrators")) && (User.Identity.IsAuthenticated)) { if (!Page.IsPostBack) { TextBox UserEmailTB = (TextBox)LoginView1.FindControl("UserEmailTextBox"); Label UserLbl = (Label)LoginView1.FindControl("UserLabel"); MembershipUser user = Membership.GetUser(User.Identity.Name); UserLbl.Text = User.Identity.Name; UserEmailTB.Text = user.Email; } } }
protected void Button8_Click(object sender, EventArgs e) { String login = Context.User.Identity.Name; var miasto = (TextBox)LoginView1.FindControl("miasto"); if (miasto.Text.Equals("")) { var dialog = (Label)LoginView1.FindControl("Okno"); dialog.Visible = true; dialog.Text = "To pole nie może być puste!"; } else { SqlCommand cmd = new SqlCommand("update Uzytkownicy set Miasto=@miasto where Login=@login", con); cmd.Parameters.AddWithValue("@miasto", miasto.Text); cmd.Parameters.AddWithValue("@login", login); con.Open(); cmd.ExecuteNonQuery(); var dialog = (Label)LoginView1.FindControl("Okno"); dialog.Visible = true; dialog.Text = "Zmieniono!"; } con.Close(); }
public void data() { MembershipUser mem = Membership.GetUser(); if (mem != null) { Literal text = (Literal)LoginView1.FindControl("Literal2"); ProfileCommon comm = Profile.GetProfile(mem.UserName); string tempname = comm.name; if (tempname.Length > 8) { tempname = tempname.Substring(0, 8); text.Text = "Welcome " + tempname + "..."; } else { text.Text = "Welcome " + tempname; } } else { } }
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { try { TextBox txtUserName = LoginView1.FindControl("txtUserID") as TextBox; TextBox txtPassword = LoginView1.FindControl("txtPassword") as TextBox; string userName = "", password = ""; GetCookie(out userName, out password); if (txtUserName != null) { txtUserName.Text = userName; } if (txtPassword != null) { //txtPassword.Text = password;//此句不行,因为TextMode=Password时控件禁止赋值 txtPassword.Attributes.Add("Value", password); } } catch (Exception ex) { Utility.LogHelper.WriteLog(Utility.LogHelper.LogLevel.Error, "登录页加载时获取Cookie失败", ex); } } }
/// <summary> Event handler. Called by Page for load events. </summary> /// /// <remarks> Mat, 2011-01-25. </remarks> /// /// <param name="sender"> Source of the event. </param> /// <param name="e"> Event information. </param> protected void Page_Load(object sender, EventArgs e) { Login log = (Login)LoginView1.FindControl("Login"); if (log != null) { log.Focus(); } if (Roles.IsUserInRole("student")) { String userName = Page.User.Identity.Name; this.Name.Text = getUserName(userName, "student"); Name.Visible = true; Date.Text = getStartDate(userName); showDate.Visible = true; Date.Visible = true; } else if (Roles.IsUserInRole("admin")) { Name.Text = "Administrator"; Name.Visible = true; } else if (Roles.IsUserInRole("instructor")) { String userName = Page.User.Identity.Name; this.Name.Text = getUserName(userName, "instructor"); Name.Visible = true; } Session["fullName"] = this.Name.Text; }
protected void SaveButton_Click(object sender, EventArgs e) { //TODO Language ne e definirano TextBox SmtpServerTB = (TextBox)LoginView1.FindControl("SmtpServerTextBox"); TextBox SmtpUserTB = (TextBox)LoginView1.FindControl("SmtpUserTextBox"); TextBox SmtpPasswordTB = (TextBox)LoginView1.FindControl("SmtpPasswordTextBox"); TextBox SmtpDomainTB = (TextBox)LoginView1.FindControl("SmtpDomainTextBox"); TextBox MailSenderTB = (TextBox)LoginView1.FindControl("MailSenderAddressTextBox"); TextBox FooterTB = (TextBox)LoginView1.FindControl("FooterTextBox"); TextBox WebSiteTitleTB = (TextBox)LoginView1.FindControl("WebSiteTitleTextBox"); TextBox KeywordsTB = (TextBox)LoginView1.FindControl("KeywordsTextBox"); TextBox DescriptionTB = (TextBox)LoginView1.FindControl("DescriptionTextBox"); DropDownList ThemeDDL = (DropDownList)LoginView1.FindControl("ThemeDropDownList"); website = new WebSite(); website.Theme = ""; website.Lang = ""; website.SmtpServer = SmtpServerTB.Text; website.SmtpUser = SmtpUserTB.Text; website.SmtpPassword = SmtpPasswordTB.Text; website.SmtpDomain = SmtpDomainTB.Text; website.MailSenderAddress = MailSenderTB.Text; website.FooterText = FooterTB.Text; website.WebSiteTitle = WebSiteTitleTB.Text; website.Keywords = KeywordsTB.Text; website.Description = DescriptionTB.Text; website.Theme = ThemeDDL.SelectedValue; SiteDataManage.SaveData(website); Response.Redirect(Request.RawUrl); }
protected void Page_Load(object sender, EventArgs e) { if ((!IsPostBack) && (User.Identity.IsAuthenticated) && (User.IsInRole("administrators"))) { //TODO Language ne e definirano TextBox SmtpServerTB = (TextBox)LoginView1.FindControl("SmtpServerTextBox"); TextBox SmtpUserTB = (TextBox)LoginView1.FindControl("SmtpUserTextBox"); TextBox SmtpPasswordTB = (TextBox)LoginView1.FindControl("SmtpPasswordTextBox"); TextBox SmtpDomainTB = (TextBox)LoginView1.FindControl("SmtpDomainTextBox"); TextBox MailSenderTB = (TextBox)LoginView1.FindControl("MailSenderAddressTextBox"); TextBox FooterTB = (TextBox)LoginView1.FindControl("FooterTextBox"); TextBox WebSiteTitleTB = (TextBox)LoginView1.FindControl("WebSiteTitleTextBox"); TextBox KeywordsTB = (TextBox)LoginView1.FindControl("KeywordsTextBox"); TextBox DescriptionTB = (TextBox)LoginView1.FindControl("DescriptionTextBox"); DropDownList ThemeDDL = (DropDownList)LoginView1.FindControl("ThemeDropDownList"); website = new WebSite(); website = SiteDataManage.LoadData(); SmtpServerTB.Text = website.SmtpServer; SmtpUserTB.Text = website.SmtpUser; SmtpPasswordTB.Text = website.SmtpPassword; SmtpDomainTB.Text = website.SmtpDomain; MailSenderTB.Text = website.MailSenderAddress; FooterTB.Text = website.FooterText; WebSiteTitleTB.Text = website.WebSiteTitle; KeywordsTB.Text = website.Keywords; DescriptionTB.Text = website.Description; ThemeDDL.Text = website.Theme; } }
protected void Page_Load(object sender, System.EventArgs e) { if (Page.User.Identity.IsAuthenticated == false) { string link = "~/Member/Login.aspx?ReturnURL="; string url = Request.Url.ToString(); link += System.Web.HttpUtility.UrlEncode(url); HyperLink hlLogin = ( HyperLink )LoginView1.FindControl("HyperLinkLogin"); if (hlLogin != null) { hlLogin.NavigateUrl = link; } } else { Label LabelUserInRoles = ( Label )LoginView1.FindControl("LabelUserInRoles"); if (LabelUserInRoles != null) { LabelUserInRoles.Text = ""; string[] roles = Roles.GetRolesForUser(); if (roles.Length != 0) { foreach (string r in roles) { LabelUserInRoles.Text += " | " + r; } } } } }
protected void submit2_Click(object sender, EventArgs e) { var t1 = (TextBox)LoginView1.FindControl("t2"); int id_bookmark; id_bookmark = int.Parse(Request.Params["id"].ToString()); String continut = t1.Text; String utilizator = User.Identity.Name; String query = "INSERT INTO comentarii (continut,id_bookmark,utilizator) VALUES (@continut,@id_bookmark,@utilizator)"; SqlConnection con = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename='C:\Users\Patru Sorin\Desktop\WebSite8\App_Data\Database.mdf'"); con.Open(); SqlCommand com = new SqlCommand(query, con); com.Parameters.AddWithValue("continut", continut); com.Parameters.AddWithValue("id_bookmark", id_bookmark); com.Parameters.AddWithValue("utilizator", utilizator); com.ExecuteNonQuery(); }
protected void RolesUserList_RowDeleting(object sender, GridViewDeleteEventArgs e) { // Get the selected role DropDownList RoleList = (DropDownList)LoginView1.FindControl("RoleList"); if (RoleList != null) { string selectedRoleName = RoleList.SelectedValue; // Reference the UserNameLabel GridView RolesUserList = (GridView)LoginView1.FindControl("RolesUserList"); Label UserNameLabel = RolesUserList.Rows[e.RowIndex].FindControl("UserNameLabel") as Label; // Remove the user from the role System.Web.Security.Roles.RemoveUserFromRole(UserNameLabel.Text, selectedRoleName); // Refresh the GridView DisplayUsersBelongingToRole(); // Display a status message Label ActionStatus = (Label)LoginView1.FindControl("ActionStatus"); ActionStatus.Text = string.Format("User {0} was removed from role {1}.", UserNameLabel.Text, selectedRoleName); CheckRolesForSelectedUser(); } }
protected void BDeleteCategory_Click(object sender, EventArgs e) { // A category should be selected DropDownList DDLN = (DropDownList)LoginView1.FindControl("DDLCategories"); int _categoryNameId = int.Parse(DDLN.SelectedValue); string queryString = "DELETE FROM [Title] WHERE titleID = @title_ID"; Label LResult = (Label)LoginView1.FindControl("LResult"); try { SqlConnection connection = new SqlConnection(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\mydb.mdf;Integrated Security=True"); connection.Open(); SqlCommand command = new SqlCommand(queryString, connection); command.Parameters.Add("@title_ID", SqlDbType.Int).Value = _categoryNameId; command.ExecuteNonQuery(); LResult.Text = "Category deleted successfully !"; Response.Redirect("ManageCategories.aspx"); } catch (Exception ex) { LResult.Text = "ERROR: " + ex.ToString(); } }
protected void CategoryDropDownList_OnSelectedIndexChanged(object sender, EventArgs e) { if (Page.IsPostBack) { var ddl = LoginView1.FindControl("CategoryDropDownList") as DropDownList; var l = LoginView1.FindControl("NewCategoryLabel") as Label; var nc = LoginView1.FindControl("NewCategory") as TextBox; var cl = LoginView1.FindControl("CategoryList") as DropDownList; var reqnc = LoginView1.FindControl("ReqValNewCat") as RequiredFieldValidator; Debug.Assert(ddl != null, nameof(ddl) + " != null"); Debug.Assert(l != null, nameof(l) + " != null"); Debug.Assert(nc != null, nameof(nc) + " != null"); Debug.Assert(cl != null, nameof(cl) + " != null"); Debug.Assert(reqnc != null, nameof(reqnc) + " != null"); if (ddl.SelectedValue == "1") { l.Visible = false; nc.Visible = false; reqnc.Enabled = false; cl.Visible = true; } else { l.Visible = true; nc.Visible = true; reqnc.Enabled = true; cl.Visible = false; } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["name"] != null) { Label namelbl = (Label)(LoginView1.FindControl("namelbl")); namelbl.Text = "Welcome " + Convert.ToString(Session["name"]);// displaying username on header try { cartcalc(); } catch (Exception) { Label countlbl = (Label)(LoginView1.FindControl("Label1")); countlbl.Text = "Cart 0"; } //HtmlAnchor b = this.Master.FindControl("cartcount") as HtmlAnchor; //ListItem cartcount = (ListItem)(LoginView1.FindControl("cartcount")); //b.InnerText = count; } }
protected void btnCommentSubmit_Click1(object sender, EventArgs e) { TextBox tbCommentTitle = (TextBox)LoginView1.FindControl("tbCommentTitle"); TextBox tbCommentBody = (TextBox)LoginView1.FindControl("tbCommentBody"); Label lbl_msg = (Label)LoginView1.FindControl("lbl_msg"); string connStr = System.Configuration.ConfigurationManager.ConnectionStrings["dbmt16abkConnectionString"].ConnectionString; SqlConnection conn = new SqlConnection(connStr); SqlCommand insert = new SqlCommand("insert into Comment(Title, Body, Author, PostingTime, Recipe_FKid) values(@Title, @Body, @Author, @PostingTime, @Recipe_FKid)", conn); insert.Parameters.AddWithValue("@Title", tbCommentTitle.Text); insert.Parameters.AddWithValue("@Body", tbCommentBody.Text); insert.Parameters.AddWithValue("@Author", User.Identity.Name); insert.Parameters.AddWithValue("@PostingTime", DateTime.Now); insert.Parameters.AddWithValue("@Recipe_FKid", Request.QueryString["RecipeID"]); try { conn.Open(); insert.ExecuteNonQuery(); } catch (Exception ex) { lbl_msg.Text = "Error: " + ex.Message; conn.Close(); } Response.Redirect("Detail.aspx?RecipeID=" + Request.QueryString["RecipeID"]); }
protected void acepta_Command(object sender, CommandEventArgs e) { try { SqlConnection connection = new SqlConnection(); connection.ConnectionString = @"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.mdf;Integrated Security=True;User Instance=True"; connection.Open(); SqlCommand command = new SqlCommand("UPDATE User_are_Colaboratori SET stare='activ' WHERE cod_user='******' and cod_proiect=" + e.CommandArgument, connection); try { command.ExecuteNonQuery(); Response.Redirect("Notificari.aspx"); } catch (SqlException exc) { Label lb = (Label)LoginView1.FindControl("Raspuns"); lb.Text = exc.Message; } } catch (Exception exc) { Label lb = (Label)LoginView1.FindControl("Raspuns"); lb.Text = exc.Message; } }
protected void BindData() { var ListaGier = (GridView)LoginView1.FindControl("ListaGier"); DataSet ds = new DataSet(); try { ds.ReadXml(Server.MapPath("EmployeeDetails.xml")); if (ds != null && ds.HasChanges()) { ListaGier.DataSource = ds; ListaGier.DataBind(); } } catch (Exception ex) { } }
private void CheckRolesForSelectedUser() { // Determine what roles the selected user belongs to DropDownList UserList = (DropDownList)LoginView1.FindControl("UserList"); if (UserList != null) { string selectedUserName = UserList.SelectedValue; string[] selectedUsersRoles = System.Web.Security.Roles.GetRolesForUser(selectedUserName); // Loop through the Repeater's Items and check or uncheck the checkbox as needed Repeater UsersRoleList = (Repeater)LoginView1.FindControl("UsersRoleList"); if (UsersRoleList != null) { foreach (RepeaterItem ri in UsersRoleList.Items) { // Programmatically reference the CheckBox CheckBox RoleCheckBox = ri.FindControl("RoleCheckBox") as CheckBox; // See if RoleCheckBox.Text is in selectedUsersRoles if (selectedUsersRoles.Contains <string>(RoleCheckBox.Text)) { RoleCheckBox.Checked = true; } else { RoleCheckBox.Checked = false; } } } } }
protected void Page_Load(object sender, EventArgs e) { var dialog = (Label)LoginView1.FindControl("Okno"); dialog.Visible = false; if (!IsPostBack) { BindData(); } var confirm = (Label)LoginView1.FindControl("confirm"); var tak = (Button)LoginView1.FindControl("tak"); var nie = (Button)LoginView1.FindControl("nie"); tak.Visible = false; nie.Visible = false; confirm.Visible = false; var ListaGier = (GridView)LoginView1.FindControl("ListaGier"); con.ConnectionString = @"Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\kamil\source\repos\GameShop\GameShop\App_Data\MyDb.mdf;Integrated Security=True"; SqlCommand cmd = new SqlCommand("select * from [Baza_gier]", con); SqlCommand cmd1 = new SqlCommand("select * from [Baza_gier]", con); con.Open(); SqlDataAdapter sda = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); sda.Fill(dt); ListaGier.DataSource = dt; ListaGier.DataBind(); }
protected void RoleCheckBox_CheckChanged(object sender, EventArgs e) { // Reference the CheckBox that raised this event CheckBox RoleCheckBox = sender as CheckBox; // Get the currently selected user and role DropDownList UserList = (DropDownList)LoginView1.FindControl("UserList"); if (UserList != null) { string selectedUserName = UserList.SelectedValue; string roleName = RoleCheckBox.Text; // Determine if we need to add or remove the user from this role Label ActionStatus = (Label)LoginView1.FindControl("ActionStatus"); if (RoleCheckBox.Checked) { // Add the user to the role System.Web.Security.Roles.AddUserToRole(selectedUserName, roleName); // Display a status message ActionStatus.Text = string.Format("User {0} was added to role {1}.", selectedUserName, roleName); } else { // Remove the user from the role System.Web.Security.Roles.RemoveUserFromRole(selectedUserName, roleName); // Display a status message ActionStatus.Text = string.Format("User {0} was removed from role {1}.", selectedUserName, roleName); } } }
protected void UpdateUserButton_Click(object sender, EventArgs e) { MembershipUser user = Membership.GetUser(User.Identity.Name); TextBox UserEmailTB = (TextBox)LoginView1.FindControl("UserEmailTextBox"); TextBox UserPasswordTB = (TextBox)LoginView1.FindControl("UserPasswordTextBox"); TextBox ConfirmPasswordTB = (TextBox)LoginView1.FindControl("ConfirmPasswordTextBox"); TextBox OldPasswordTB = (TextBox)LoginView1.FindControl("OldPasswordTextBox"); Label MinPasswordLengthLbl = (Label)LoginView1.FindControl("MinPasswordLengthLabel"); Label UserStatusLbl = (Label)LoginView1.FindControl("UserStatusLabel"); if (UserPasswordTB.Text != "") { if (UserPasswordTB.Text.Length >= 5) { if (user.ChangePassword(OldPasswordTB.Text, UserPasswordTB.Text)) { UserStatusLbl.Text = "Password changed successfully!"; } else { UserStatusLbl.Text = "Password not changed!"; } } else { MinPasswordLengthLbl.Text = "Minimum password length is 5 characters"; } } user.Email = UserEmailTB.Text; Membership.UpdateUser(user); }
protected void CambiarTema(object sender, EventArgs e) { DropDownList DropDownList1 = (DropDownList)LoginView1.FindControl("DropDownList1"); Profile.temaPredeterminado = DropDownList1.SelectedValue; Profile.Save(); Server.Transfer(Request.FilePath); }
protected void cbe_ResolveControlID(object sender, AjaxControlToolkit.ResolveControlEventArgs e) { if (e.ControlID == "LoginViewButton") { e.Control = LoginView1.FindControl(e.ControlID); AddMessage("cbe_ResolveControlID", e.ControlID); } }
// Loads the data for week 2 protected void link_week_2_Click(object sender, EventArgs e) { DateTime date = new DateTime(2016, 10, 16); dataTable = sp_game_read_all_for_current_week(date); loadData(); (LoginView1.FindControl("link_week_2") as LinkButton).CssClass = "active"; }
protected void btnViewDeptApplicants_Click(object sender, EventArgs e) { try { GridView gView2 = (GridView)LoginView1.FindControl("GridView2"); gView2.DataSourceID = ""; ObjectDataSource objDSAdmin = (ObjectDataSource)LoginView1.FindControl("ObjectDataSource3"); gView2.DataSource = objDSAdmin; gView2.DataBind(); } catch (Exception _err) { } try { GridView gView2 = (GridView)LoginView1.FindControl("GridView2"); gView2.DataSourceID = ""; ObjectDataSource objDSAdmin = (ObjectDataSource)LoginView1.FindControl("ObjectDataSource1"); gView2.DataSource = objDSAdmin; gView2.DataBind(); } catch (Exception _err) { } try { GridView gView1 = (GridView)LoginView1.FindControl("GridView2"); gView1.DataSourceID = ""; ObjectDataSource objDSAdmin = (ObjectDataSource)LoginView1.FindControl("ObjectDataSource3"); gView1.DataSource = objDSAdmin; gView1.DataBind(); } catch (Exception _err) { } try { GridView gView1 = (GridView)LoginView1.FindControl("GridView2"); gView1.DataSourceID = ""; ObjectDataSource objDSAdmin = (ObjectDataSource)LoginView1.FindControl("ObjectDataSource1"); gView1.DataSource = objDSAdmin; gView1.DataBind(); } catch (Exception _err) { } }
protected void Button2_Click(object sender, EventArgs e) { var nr = (TextBox)LoginView1.FindControl("nr"); var Button6 = (Button)LoginView1.FindControl("Button6"); Button6.Visible = true; nr.Visible = true; }
protected void Page_Load(object sender, EventArgs e) { if (Session["Name"] != null) { Label userlabel1 = (Label)(LoginView1.FindControl("userlabel1")); userlabel1.Text = "Welcome:: " + Session["Name"].ToString(); } }
protected void ListaGier_PageIndexChanging(object sender, GridViewPageEventArgs e) { var ListaGier = (GridView)LoginView1.FindControl("ListaGier"); ListaGier.PageIndex = e.NewPageIndex; BindData(); }
protected void Button1_Click(object sender, EventArgs e) { var email = (TextBox)LoginView1.FindControl("email"); var Button5 = (Button)LoginView1.FindControl("Button5"); Button5.Visible = true; email.Visible = true; }