Ejemplo n.º 1
0
        private void AddLoginControlAttributes(AuthenticationLoginBase loginControl)
        {
            //search selected authentication control for username and password fields
            //and inject autocomplete=off so browsers do not remember sensitive details
            var username = loginControl.FindControl("txtUsername") as WebControl;
            if (username != null)
            {
                username.Attributes.Add("AUTOCOMPLETE", "off");
            }
            var password = loginControl.FindControl("txtPassword") as WebControl;
            if (password != null)
            {
                password.Attributes.Add("AUTOCOMPLETE", "off");
            }

            //see if the portal supports persistant cookies
            var rememberme = (CheckBox) FindControl("chkCookie");
            rememberme.Visible = Host.RememberCheckbox;
        }
Ejemplo n.º 2
0
		private void AddLoginControlAttributes(AuthenticationLoginBase loginControl)
		{
			//search selected authentication control for username and password fields
			//and inject autocomplete=off so browsers do not remember sensitive details
			var username = loginControl.FindControl("txtUsername") as WebControl;
			if (username != null)
			{
				username.Attributes.Add("AUTOCOMPLETE", "off");
			}
			var password = loginControl.FindControl("txtPassword") as WebControl;
			if (password != null)
			{
				password.Attributes.Add("AUTOCOMPLETE", "off");
			}
		}