Archive
Calender
<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011
Blogroll
    Recent comments

    None

    This example adds a password strength bar to an asp.net textbox password control.

    This goes in the page load event.

     

                this.Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "password_strength", this.ResolveClientUrl("~/javascript/pwd_strength.js"));

                TextBox pwd = (TextBox) this.CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("Password");

                pwd.Attributes.Add("onkeyup", "password_strength(this.value);"); 

    This is the DataGridView handler you need to capture the button click event.
    this.dgvList.CellContentClick += new DataGridViewCellEventHandler(DGV_CellContentClick);
    This is the button click handler example
    #region DGV_CellContentClick
    public void DGV_CellContentClick(object sender, DataGridViewCellEventArgs e)
    {
        int selectedRowIndex = int.Parse(e.RowIndex.ToString());
     
        if (this.dgvList.Columns[e.ColumnIndex] == buttonColumn && selectedRowIndex >= 0)
        {
            DataRow dr = DataGridViewHelper.GetDataRow(this.dgvList);
            MessageBox.Show((string)dr["FirstName"]);
        }
    }
    #endregion
    Have a million different passwords that you've conjured up for websites and need a place to store it. (Alpha version) .Net(3.5) required. Download this free software.

    PKSetup.msi (2.64 mb)