vs2008

Dec 4, 2007 at 3:07 AM
Tried taking a look at version 1.2 Blog Engine in vs2008 and let it convert to 3.5 etc. but can't get a handle of the use model - Opening the login.aspx and in design mod get error - The page has controls that require a master Page Reference but none specified - any thoughts
Dec 4, 2007 at 10:59 AM
That's normal since none of the pages have a static reference to the master page. The master page is part of the theme, so the method used to specify it is through code at runtime. If you search for site.master or MasterPageFile through the entire solution, you will see that it gets set in the OnPreInit method in the class BlogEngine.Core.Web.Controls.BlogBasePage. Refer to the following line:

MasterPageFile = Utils.RelativeWebRoot + "themes/" + _Theme + "/site.master";
If you want to be able to design the page you can add a static reference to the master page you are using. Just add the reference to the @Page directive at the top of any page.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="page.aspx.cs" Inherits="page" MasterPageFile="~/themes/Standard/site.master" %>
That should let you play with it in design mode. Note however that you may still get some errors since some of the custom controls used do not have design time related code to support that mode.
Dec 5, 2007 at 4:12 AM


stevegw wrote:
Tried taking a look at version 1.2 Blog Engine in vs2008 and let it convert to 3.5 etc. but can't get a handle of the use model - Opening the login.aspx and in design mod get error - The page has controls that require a master Page Reference but none specified - any thoughts


Thanks for the quick response