Click here to Skip to main content
11,924,800 members (57,209 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET
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 21-Nov-12 18:16pm
Edited 21-Nov-12 18:17pm
What do you mean by "call a grid"? This is not a method/function/procedure/operator...

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.151125.3 | Last Updated 22 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100