Click here to Skip to main content
15,885,915 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In my aspx page i have two grid..

both grid contain same button show ... on page load one grid show at a time ..
the button event work for one grid not for other...


how we can call same button event by both gridview
Posted
Comments
koolprasad2003 15-Nov-11 0:18am    
please post the code it will clear the way.

1 solution

Without being able to see your code, it's hard to really understand what you are trying to do. But in general, if you want two different controls to perform the same code you can just add both to the Handles part of the Event Handler. For example, if you have Button1 and Button2 and you want them to do the exact same think when clicked you would have this:
(It's in VB, but you should be able to see what I'm talking about)
VB
Private Sub Buttons1and2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click, Button2.Click
   'Code that both buttons should perform when clicked
End Sub
 
Share this answer
 
Comments
shwiuwew 17-Nov-11 6:04am    
Thanks Kschule

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