Hi!
i am taking one label, one Textbox, one button. in my label text is 150.
my aim i enter text in textbox and click button, that label shows a value is 149. and again i enter text in textbox and click button also decrease one value from label i.e., this time 148. similarly.
How to Write the code to do it. please can u provide a code todo this.
Thanks.
Loading
ArshadPosted Apr 25, 2010, 4:58 PM
code i.e given above it correct but better you implement this logic in javascript. if your requirement is like that then no issue.
Vladimir NaniPosted Apr 22, 2010, 9:34 AM
Add button and label to form.
ushort val;
public Form1()
{
InitializeComponent();
val = 150;
label1.Text = val.ToString();
}
private void button1_Click(object sender, EventArgs e)
{
val--;
label1.Text = val.ToString();
}