Click here to Skip to main content
15,911,139 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi have a page
test.aspx and an user Control uc.ascx, there is a gridview on user control uc.ascx how can i bind it page load of test.aspx


Please help
Posted
Comments
_Amy 4-Mar-13 3:57am    
Binding the controls is having same procedure which we used to follow in aspx page. Follow the same rules.

1 solution

Hi,

try below code in your code behind of test.aspx page.
C#
GridView grid = (GridView)uc.FindControl("gridview1");
if(grid != null)
{
//bind the gridview object (grid) here.
}

hope it helps.
 
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