I have problem With My Calculator in ASP.NET C# in Microsoft Visual Web Developer 2008 Express Edition : web application not windows application

the code:

protected void Button2_Click(object sender, EventArgs e)
{

//Double F1;
//Double S1;
// Double Re;
// F1 = Convert.ToDouble(TextBox1.Text);
// S1 = Convert.ToDouble(TextBox2.Text);
// Re = F1 - S1;
// Label1.Text = Convert.ToString(Re);

}

how to make it works with one text box ?

it means one box take the first number then operation -+*/ then the second number , final the result after i click the = button

thnx

sknake commented: code tags, double posted -1

Recommended Answers

All 4 Replies

You mean something like 1.23 + 45.6 and after a click on the =button it would become 46.83 ?

You mean something like 1.23 + 45.6 and after a click on the =button it would become 46.83 ?

yes exactly, but both two values must be entered in one text box like windows calculator

Like example:

enter first value 1 in that text box then click -+/ the value will be stored in variable, after that you will see nothing in text box then you entered the second value 2, after you clicked = you will see the result 3 just

thnx

discussion continued here. Closed

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.