Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# question - how to tell if checkbox is checked?
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
C# question - how to tell if checkbox is checked?
Environment versions
Environment:
C# 3.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01305128
Message ID:
01305128
Views:
60
Yippie! My first .NET question! (and yeah its realllly lame too .. haha)

I have a checkbox I put on a form, and I'm trying to tell if it's been checked or not. I have something like this:

if (dlgOpen.ShowDialog() == DialogResult.OK)
{
// Console.Write(dlgOpen.FileName);
crystalReportViewer1.ReportSource = dlgOpen.FileName;
if chkAutoRequery.Checked() = true
{
crystalReportViewer1.RefreshReport();
}
}


chkAutoRequery is the name of my checkbox - so its this line:
if chkAutoRequery.Checked() = true
..that I'm doing wrong. Anyone clue me in on the correct syntax?

Thanks!
ICQ 10556 (ya), 254117
Next
Reply
Map
View

Click here to load this message in the networking platform