Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code worked yesterday and doesn't work today
Message
General information
Forum:
ASP.NET
Category:
Other
Environment versions
OS:
Windows XP
Database:
MS SQL Server
Miscellaneous
Thread ID:
01315367
Message ID:
01315376
Views:
21
>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!
____________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform