Replies |
Ranjeet_8
Posted on: 7/24/2012 7:33:00 AM
|
Level: Gold | Status: [Member] | Points: 50
|
static int count = 0;
protected void Button1_Click(object sender, EventArgs e)
{
count++;
Button1.Text=count.ToString();
}
Nareyugam, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Vuyiswamb
Posted on: 7/24/2012 8:18:20 AM
|
Level: NotApplicable | Status: [Member] [MVP] [Administrator] | Points: 25
|
Good Answer @Ranjeet_8
Thank you for posting at Dotnetfunda
[Administrator]
Nareyugam, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Oswaldlily
Posted on: 7/24/2012 8:18:37 AM
|
Level: Starter | Status: [Member] | Points: 50
|
 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Label1.Text = "Label1" Then
Label1.Text = String.Empty
End If
If Label1.Text = String.Empty Then
Label1.Text = 1
Else
Label1.Text = Convert.ToString(Convert.ToInt32(Label1.Text) + 1)
End If
End Sub
Nareyugam, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Nareyugam
Posted on: 7/24/2012 1:12:15 PM
|
Level: Starter | Status: [Member] | Points: 25
|
Thanks ranjeet, i alrdy use this, need some other way..
VenkatNaresh
Nareyugam, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
 Hi
you can store it in View state R D Patel
Nareyugam, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Ranjeet_8
Posted on: 7/25/2012 1:27:40 AM
|
Level: Gold | Status: [Member] | Points: 50
|
 protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
ViewState["Count"] = 0;
}
protected void Button1_Click(object sender, EventArgs e)
{
ViewState["count"] = Convert.ToInt32(ViewState["count"]) + 1;
Button1.Text = ViewState["count"].ToString();
}
Nareyugam, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Nareyugam, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Nareyugam, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Ranjeet_8
Posted on: 7/25/2012 2:47:29 AM
|
Level: Gold | Status: [Member] | Points: 25
|
Nareyugam, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Nareyugam
Posted on: 7/25/2012 5:16:02 AM
|
Level: Starter | Status: [Member] | Points: 25
|
Nareyugam, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Ranjeet_8
Posted on: 7/25/2012 6:24:22 AM
|
Level: Gold | Status: [Member] | Points: 25
|
Hi Nareyugam
Mark As Answer if my post helped u.
Nareyugam, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|
Nareyugam
Posted on: 7/29/2012 9:08:07 AM
|
Level: Starter | Status: [Member] | Points: 25
|
Thank you it really helpful
VenkatNaresh
Nareyugam, if this helps please login to Mark As Answer. |
Reply | Alert Moderator
|