Logo de Media ap
Forum | Contact
Search the Web:

Accès au controle d'un gridview (FindControl)


En dotnet 2.0, l'accès au controle dans un GriView se fait de la manière suivante

    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        DropDownList ddl = (DropDownList)e.Row.FindControl("DropDownListDays");

        if (ddl != null)
        {
            lb.Text = ddl.SelectedValue;
        }


    }

Write a comment

  • Required fields are marked with *.

If you have trouble reading the code, click on the code itself to generate a new random code.
Security Code: