Click here to Skip to main content
15,913,941 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralVSTS 2005 conversion wizard Issue Pin
vamsimohan2122-Aug-08 11:41
vamsimohan2122-Aug-08 11:41 
QuestionTrying to get a handle on basic web services performance Pin
PGumbo22-Aug-08 5:53
PGumbo22-Aug-08 5:53 
QuestionHow to get all the textbox fields get cleared with a for-each loop ? Pin
Subin Alex22-Aug-08 5:43
Subin Alex22-Aug-08 5:43 
AnswerRe: How to get all the textbox fields get cleared with a for-each loop ? Pin
SomeGuyThatIsMe22-Aug-08 5:55
SomeGuyThatIsMe22-Aug-08 5:55 
AnswerRe: How to get all the textbox fields get cleared with a for-each loop ? Pin
Blue_Boy22-Aug-08 12:09
Blue_Boy22-Aug-08 12:09 
QuestionDynamic GridView Pin
DotNetCoderJunior22-Aug-08 4:40
DotNetCoderJunior22-Aug-08 4:40 
QuestionRe: Dynamic GridView Pin
Jörgen Andersson22-Aug-08 4:56
professionalJörgen Andersson22-Aug-08 4:56 
Questioncalculator project getting error Pin
madhu Rao22-Aug-08 3:54
madhu Rao22-Aug-08 3:54 
HI ALL,

i'd calculator project in that i'm getting small error after getting the result (2+3=5)

the result value 5 is not deleting in text box, again it adding to new value given by user

can u help me


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;

namespace cal_sample
{
public partial class Form1 : Form
{
int r;

ArrayList a = new ArrayList();
public Form1()
{
InitializeComponent();
}
private void button_one_Click(object sender, EventArgs e)
{
//textBox1.Text = "";
textBox1.Text = textBox1.Text+button_one.Text;

}

private void button_two_Click(object sender, EventArgs e)
{
//textBox1.Text = "";
textBox1.Text = textBox1.Text + button_two.Text;


}

private void button_three_Click(object sender, EventArgs e)
{
//textBox1.Text = "";
textBox1.Text = textBox1.Text + button_three.Text;

}

private void button_four_Click(object sender, EventArgs e)
{
//textBox1.Text = "";
textBox1.Text = textBox1.Text + button_four.Text;
}

private void button_five_Click(object sender, EventArgs e)
{
// textBox1.Text = "";
textBox1.Text = textBox1.Text + button_five.Text;
}

private void button_six_Click(object sender, EventArgs e)
{
//textBox1.Text = "";
textBox1.Text = textBox1.Text + button_six.Text;
}

private void button_seven_Click(object sender, EventArgs e)
{
//textBox1.Text = "";
textBox1.Text = textBox1.Text + button_seven.Text;
}

private void button_eight_Click(object sender, EventArgs e)
{
//textBox1.Text = "";
textBox1.Text = textBox1.Text + button_eight.Text;
}

private void button_nine_Click(object sender, EventArgs e)
{
//textBox1.Text = "";
textBox1.Text = textBox1.Text + button_nine.Text;
}

private void plus_Click(object sender, EventArgs e)
{
if(textBox1.Text !="")
{
a.Add(Convert.ToSingle(textBox1.Text));
textBox1.Text = "";
}
else
textBox1.Text = Convert.ToString(0 + r);

}

private void equl_Click(object sender, EventArgs e)
{
r = 0;
for (int i = 0; i < a.Count; i++)
r = r + Convert.ToInt32(a[i]);

if (textBox1.Text != "")
{
textBox1.Text = Convert.ToString(r + Convert.ToInt32(textBox1.Text));
a.Clear();

}
else
textBox1.Text = Convert.ToString(r + 0);


}

private void button_clear_Click(object sender, EventArgs e)
{
textBox1.Clear();

}

private void button_zero_Click_1(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + button_zero.Text;
}

private void Form1_Load(object sender, EventArgs e)
{

}

private void button_period_Click(object sender, EventArgs e)
{
textBox1.Text = textBox1.Text + button_period.Text;
}

}
}
[code][/code]

madhu

AnswerRe: calculator project getting error Pin
SomeGuyThatIsMe22-Aug-08 4:07
SomeGuyThatIsMe22-Aug-08 4:07 
AnswerRe: calculator project getting error Pin
Abhijit Jana22-Aug-08 4:20
professionalAbhijit Jana22-Aug-08 4:20 
Questionwebparts Pin
nithydurai22-Aug-08 2:25
nithydurai22-Aug-08 2:25 
AnswerRe: webparts Pin
Abhijit Jana22-Aug-08 2:40
professionalAbhijit Jana22-Aug-08 2:40 
AnswerRe: webparts Pin
Brij22-Aug-08 4:10
mentorBrij22-Aug-08 4:10 
GeneralRe: webparts Pin
Abhijit Jana22-Aug-08 4:18
professionalAbhijit Jana22-Aug-08 4:18 
QuestionHandling textbox's lostfocus event Pin
pavya_Cool22-Aug-08 2:21
pavya_Cool22-Aug-08 2:21 
AnswerRe: Handling textbox's lostfocus event Pin
Perspx22-Aug-08 2:30
Perspx22-Aug-08 2:30 
QuestionRe: Handling textbox's lostfocus event Pin
pavya_Cool22-Aug-08 2:46
pavya_Cool22-Aug-08 2:46 
AnswerRe: Handling textbox's lostfocus event Pin
Abhijit Jana22-Aug-08 2:53
professionalAbhijit Jana22-Aug-08 2:53 
AnswerRe: Handling textbox's lostfocus event Pin
Abhijit Jana22-Aug-08 2:42
professionalAbhijit Jana22-Aug-08 2:42 
GeneralRe: Handling textbox's lostfocus event Pin
pavya_Cool22-Aug-08 2:58
pavya_Cool22-Aug-08 2:58 
AnswerRe: Handling textbox's lostfocus event Pin
Abhijit Jana22-Aug-08 3:01
professionalAbhijit Jana22-Aug-08 3:01 
QuestionADODB not working in 64 bit machine Pin
N.Surendra Prasad22-Aug-08 1:13
N.Surendra Prasad22-Aug-08 1:13 
AnswerRe: ADODB not working in 64 bit machine Pin
Abhijit Jana22-Aug-08 1:17
professionalAbhijit Jana22-Aug-08 1:17 
GeneralRe: ADODB not working in 64 bit machine Pin
N.Surendra Prasad22-Aug-08 1:55
N.Surendra Prasad22-Aug-08 1:55 
AnswerRe: ADODB not working in 64 bit machine Pin
Abhijit Jana22-Aug-08 1:59
professionalAbhijit Jana22-Aug-08 1:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.