Click here to Skip to main content
15,895,799 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
any one have an idea of user controls?
the problem is that i have 2 grids in the same user control but when i call it from master page grid1 has to be displayed and when i call it from another web form grid2 has to be displayed?
i am trying to solve it from page load event of user control .Is there any other way to call them
Posted
Updated 21-Nov-12 17:17pm
v2
Comments
Sergey Alexandrovich Kryukov 22-Nov-12 2:06am    
What do you mean by "call a grid"? This is not a method/function/procedure/operator...
--SA

1 solution

Straightaway answer would be to split your one user control to two user controls having different grids which makes more sense. However if for any reason you are not able to do that, then incorporate two public boolean properties in your user control, which could be set from the the page/master page where the user control is rendered. So if you want to see the first grid then set the first boolean property as true and the second one as false and use these properties for the visible property of grids.

Regards
Pawan
 
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