samedi 6 mars 2021

Find ASP.NET WebForms Control and change its ID

How can I find this checkbox on blue line below on code behind?

I've tried to use FindControl method like this:

CheckBox cb = (CheckBox)Page.FindControl("pendencia_count");

And also tried to find on GridView, but the result is always null.

There is a loop on grid and the controls are generated with equal IDs. I need to dynamically change its IDs.

Is there a better way to do this?

Thanks a lot!

enter image description here




Aucun commentaire:

Enregistrer un commentaire