Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code worked yesterday and doesn't work today
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
OS:
Windows XP
Database:
MS SQL Server
Divers
Thread ID:
01315367
Message ID:
01315376
Vues:
22
>Hi everybody,
>
>I have a very strange problem. I added some code yesterday which worked in my tests
>
>protected void bntSavedApproved_Click(object sender, EventArgs e)
>    {
>        int PeopleApproved = 0;
>            for (int i = 0; i < this.ProfilesGrid.Rows.Count; i++ )
>            {
>                CheckBox chkbtnApproved = this.ProfilesGrid.Rows[i].FindControl("chkApproved") as CheckBox ;
>
>                if (chkbtnApproved != null)
>                {
>                    if (chkbtnApproved.Checked == true)
>                    {
>                        int RegID = (int)this.ProfilesGrid.DataKeys[i].Value ;
>                        Util.RunStoredProc("SaveApprovedPerson", new System.Data.SqlClient.SqlParameter("RegistrationID", RegID));
>                        PeopleApproved++;
>                    }
>                }
>            }
>
>
>Today I continued to work on this page, added one more control, etc. and for some reason it doesn't work anymore. I check the checkbox in the grid, but it doesn't go into chkbtnApproved.Checked = true anymore.
>
>Do you know what could be wrong?
>
>Thanks in advance.

Is it because you are first checking chkbtnApproved != null rather than chkbtnApproved.checked != null ?
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform