Click here to Skip to main content
Rate this: bad
good
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 17:16pm
Edited 21-Nov-12 17:17pm
v2
Comments
Sergey Alexandrovich Kryukov at 22-Nov-12 2:06am
   
What do you mean by "call a grid"? This is not a method/function/procedure/operator...
--SA

1 solution

Rate this: bad
good
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.
 
Regards
Pawan
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 613
1 BillWoodruff 299
2 PIEBALDconsult 290
3 George Jonsson 265
4 Sergey Alexandrovich Kryukov 254
0 Sergey Alexandrovich Kryukov 10,694
1 OriginalGriff 5,354
2 Maciej Los 5,354
3 CPallini 3,729
4 BillWoodruff 3,556


Advertise | Privacy | Mobile
Web02 | 2.8.141029.1 | Last Updated 22 Nov 2012
Copyright © CodeProject, 1999-2014
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