Exemple #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");
            }
        }
        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;
        }