This project is read-only.

Template for Pages

Topics: ASP.NET 2.0, Business Logic Layer, Controls, Themes
Mar 28, 2011 at 9:25 AM

Is there any way I can set the template used for pages? I'd like to have a sidebar on every page except home. Is this possible?

Mar 28, 2011 at 11:32 AM
Edited Oct 24, 2011 at 9:44 PM

Have code behind in your master page.   site.master.cs


Have it for pages "Show sidebar"   For posts "Don't show sidebar"   If front page "Don't show sidebar"



Like this:


protected void Page_Load(object sender, EventArgs e)
        var url = Request.Url.ToString();
        if (url.Contains("page.aspx"))

            WidgetZone.Visible = false;



        WidgetZone.ZoneName = "be_WIDGET_ZONE";


Java Blog