C# Help with value change?
-
I have a database which gives the values into it but I want to be able to have two + and - buttons so that the value and be increased and decreased using them and then I can update it (which is working fine) so that the value gets saved into the access database. Does anyone know how I can get these buttons to work because they are having problems, here is the example of what : private void button1_Click(object sender, EventArgs e) { field2TextBox = double.Parse(field2TextBox.Text) + a; field2TextBox = field2TextBox.ToString; } and the errors are : 1.Cannot implicitly convery type 'double' to 'System.Windows.Forms.TextBox' 2.Cannot convert method group 'ToString' to non-delegate type 'System.Windows.Forms.TextBox'. Did you intend to invoke the method ?
-
Answer:
You need to assign the values to the Text property of the TextBox object field2TextBox.Text = double.Parse(field2TextBox.Text) + a; field2TextBox.Text = field2TextBox.ToString(); //<- method call, you need the brackets
Owen at Yahoo! Answers Visit the source
Related Q & A:
- How can I change a value in an array?Best solution by Stack Overflow
- How do I change the value of an attribute?Best solution by Stack Overflow
- How to quantify the relevant value change?Best solution by stackoverflow.com
- How can I deserialize JSON {name, value} in C#?Best solution by Stack Overflow
- How to change input value in formly?Best solution by Stack Overflow
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.