.net - Set a string when a CheckBox has been checked (C#) -


i have check box in winforms, when checked set string e.g.:

string checkbox = true 

edit: or better example:

bool checkbox = true; 

so when method run lookup string , dependent on it's value perform a submethod...

so question how set string on checkbox when clicked, have checked actions list , closest "checkchanged", won't work.

why checkchanged not work?

bool checkbox = false; private void checkbox1_checkedchanged(object sender, eventargs e) {     if (checkbox1.checked)    {       checkbox = true;    } } 

or use checkbox1.checked in subroutine.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -