[Message Deleted]
-
here is the logic . convert it to C# code. Button Button1; // by default button text will be On bool btn_status = true; public void Button1_Click() if(btn_status) { //put query here to write A Button1.Text = "Off"; btn_status = !btn_status; //! Operator will alter boolean value of btn_status } else { //put query here to write a Button1.Text = "On"; btn_status = !btn_status; }
-
Hi, And its not evening here yet/anymore... you have been trying to do this for over a week now and all you CP posts have been related to this. I strongly suggest you start from the basics and get yourself a good beginners book on C#.Net, as this is a fairly straight forward task and you don't seem to be able to do it, despite the help given in your previous posts. But I'll give you another go... Do you have any database code at the moment? If so, does it work? When are you wanting to write to the database? On a button click? Have you actually got your button to work? i.e. changes when clicked, and you are able to retrieve a value to state if it is On or Off when needed? Answer these and then we can progress.... Hopefully
Life goes very fast. Tomorrow, today is already yesterday.