[Message Deleted]
-
Member 3499052 wrote:
How can i calculate this text box. TextBox1.Text = "1+2+3"; to giv me int total = 6;
Hi, you can do this with below code..
int i = 1+2+3; TextBox1.Text = i.ToString();
Hope it will help you.Thanks, Sun Rays To get something you must have to try once. My Articles
thanks but i think we misunderstud i have a gridview where you can clik on row and the value of the row is typing in textbox like this this is a textbox.Text = 1+3+4+5+6. now a need a function to calculate that. i have this code int i = Convert.ToInt32(TextBox1.Text); Label1.Text = i.ToString(); But its not working ;-( Thanks very mutch..
-
thanks but i think we misunderstud i have a gridview where you can clik on row and the value of the row is typing in textbox like this this is a textbox.Text = 1+3+4+5+6. now a need a function to calculate that. i have this code int i = Convert.ToInt32(TextBox1.Text); Label1.Text = i.ToString(); But its not working ;-( Thanks very mutch..
Hi, first of all what are you diong ? what you wanna do its yet not clear.
Member 3499052 wrote:
textbox.Text = 1+3+4+5+6
int i = 1+3+4+5+6; // you can calculate here textbox.Text =i.ToString(); // here you can convert i to string
NowMember 3499052 wrote:
int i = Convert.ToInt32(TextBox1.Text); Label1.Text = i.ToString();
No need for this, Just write,
Label1.Text = TextBox1.Text;
Thanks, Sun Rays To get something you must have to try once. My Articles
-
Hi, first of all what are you diong ? what you wanna do its yet not clear.
Member 3499052 wrote:
textbox.Text = 1+3+4+5+6
int i = 1+3+4+5+6; // you can calculate here textbox.Text =i.ToString(); // here you can convert i to string
NowMember 3499052 wrote:
int i = Convert.ToInt32(TextBox1.Text); Label1.Text = i.ToString();
No need for this, Just write,
Label1.Text = TextBox1.Text;
Thanks, Sun Rays To get something you must have to try once. My Articles
-
[Message Deleted]
-
thank you but how ? can you write a exampel ? thanks very mutch
-
thank you but how ? can you write a exampel ? thanks very mutch
If you'd followed the link you'd have found a whole article about one. I'm curious as to why you voted me down for pointing you towards the answer.
Deja View - the feeling that you've seen this post before.
-
If you'd followed the link you'd have found a whole article about one. I'm curious as to why you voted me down for pointing you towards the answer.
Deja View - the feeling that you've seen this post before.
sorry i that it was a page list .. i wrote u up now.. sorry.. thanks very mutch
-
sorry i that it was a page list .. i wrote u up now.. sorry.. thanks very mutch
No problem - BTW, I really like that article which is why I pointed you to it. It's very good.
Deja View - the feeling that you've seen this post before.
-
He wants to write a calculator, where he can type into a textbox "1+2-3*4" and it does the calculating for him. ie/ you've totally misunderstood the point!
Ohhhh, ya really man... :cool:
Thanks, Sun Rays To get something you must have to try once. My Articles
-
No problem - BTW, I really like that article which is why I pointed you to it. It's very good.
Deja View - the feeling that you've seen this post before.
sorry but i have no ide how its works.. i read the articel but i did't understand.
-
sorry but i have no ide how its works.. i read the articel but i did't understand.
Include a reference to his assembly in your project and then do the following:
ExpressionEval eval = new ExpressionEval(txtFunction.Text); object output = eval.Evaluate(); if (output != null) { // You have your answer. Do what you want with it. }
Deja View - the feeling that you've seen this post before.
-
[Message Deleted]
Please don't delete your message once someone has replied. It kind of dirties the forums.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon