添加@ MasterType标记到页面中,以便可以作为强类型属性引用Master Page页面的Offset属性。
<%@ MasterType VirtualPath="Master.master" %>
前台文件代码:
<%@ Page Language="C#" MasterPageFile="~/UI/Master.master" AutoEventWireup="true" CodeFile="BS.aspx.cs" Inherits="UI_BS" Title="Untitled Page" %>
<%@ MasterType VirtualPath="Master.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"></asp:Content>