New answers tagged asp.net
I suggest that you create a custom WebControl of your own which you wrap around each of the controls in the Page Layout that should be hidden if empty. You could have a property on your custom control that will be containing the ID of the control it should hide if the control is empty. Example: <MyControls:HideWhenEmpty runat="server" ...
Yes. You can get the SPWeb using OpenWeb() method and then pass the SubSiteName using(SPWeb web = sites.OpenWeb("subsiteurl"))
Top 50 recent answers are included