Click here to Skip to main content
15,895,709 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi all,

I have a link button in gridview item template.
How can i access that link button id outside the gridview.

Thanks in advance
Venkatesh..
Posted

1 solution

The best option is Looping Through GridView[^]:
C#
foreach (GridViewRow gvrow in GridView1.Rows) 
{ 
    LinkButton LinkButton1 = (LinkButton)gvrow.FindControl("LinkButton1"); 
    if (LinkButton1 != null) 
    { 
        //Do your operations here. 
    } 
}




--Amit
 
Share this answer
 

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