Click here to Skip to main content
16,016,425 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have below javascript code in these code i want to pass gridview id as arugument so how can i pass.

onclick="javascript:SelectheaderCheckboxes(this)"
Posted

1 solution

If onclick in your sample belongs the GridView, than this will be the GridView, so you can use this.id. Other option is use value from the server:
JavaScript
onclick="javascript:SelectheaderCheckboxes(<% GridView.ClientId %>)"
This will work even onclick not belongs to GridView...
 
Share this answer
 
v3

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