Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I wanted to count the number of rows added to the gridview on add button click .How can I do this?
Posted

1 solution

Create a counter variable (integer). Every time you add a button, in the same code increment the counter. It doesn't matter if you are doing it on the client side or the server side. The logic is same.
As simple as that!
 
Share this answer
 
Comments
Ni!E$H_WAGH 7-Mar-14 4:49am    
I tried using shared variable but faced problem that it retains the value of previous run also..
Ankur\m/ 7-Mar-14 6:53am    
Where are you doing it - Server side or client side?
Paste the relevant code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900