Master分类上无法识别变量

时间:2015-03-29 02:32:40

标签: c# asp.net .net webforms master-pages

这是一个旧项目,.Net 3.5,我现在正尝试将其更新为4.5。 我正在尝试使用母版页:

NZHos3ColNew.master

<%@ Master Language="C#"  AutoEventWireup="true" CodeFile="NZHos3ColNew.master.cs" Inherits="NZJobFinder.NZTemplateMasterPage" %>

NZHos3ColNew.master.cs

namespace NZJobFinder {
public partial class NZTemplateMasterPage: System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e)
        litLoginStyle.Text = "style='height:10px;padding-top:5px;width:70px;left:890px;top:10px;'";

但是,在建造时,我得到了:

Error   24  The name 'litLoginStyle' does not exist in the current context  C:\nzjobfinder\App_Master\NZHos3ColNew.master.cs    25  21  nzjobfinder

这里有什么帮助吗?我错过了什么?感谢。

0 个答案:

没有答案
相关问题