[英]'pageTitleClass' could not be found
這是我的課程,進入App_Code pageTitle.cs,我收到編譯錯誤...
Line 4: <html xmlns="http://www.w3.org/1999/xhtml">
Line 5: <head runat="server">
Line 6: <title><% pageTitleClass pagetitle = new pageTitleClass(); Response.Write(pagetitle.siteTitle); %></title>
Line 7: <link href='http://fonts.googleapis.com/css?family=Roboto&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
Line 8: <link href='http://fonts.googleapis.com/css?family=Roboto+Condensed&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
Source File: d:\inetpub\turkeco.com\www\beta\default.aspx Line: 6
d:\inetpub\turkeco.com\www\beta\default.aspx(6,46): error CS0246: The type or namespace name 'pageTitleClass' could not be found (are you missing a using directive or an assembly reference?)
d:\inetpub\turkeco.com\www\beta\default.aspx(6,15): error CS0246: The type or namespace name 'pageTitleClass' could not be found (are you missing a using directive or an assembly reference?)
public class pageTitleClass
{
public string siteTitle = "PageTitle";
}
它在localhost上工作,但是我的托管公司將服務器更新到Windows Server 2008,並且報錯。 是我還是托管公司導致此問題,該如何解決?
這似乎是設置頁面標題的一種非常奇怪的方式。 正常的方法是在“代碼隱藏”類中。 在Page_Load事件中設置this.Title = "Page Title";
。
否則,沒有足夠的信息來幫助您。 顯然您不再遇到編譯錯誤
它是可行的,但是...
...但是您沒有提供有關W2K8的錯誤的詳細信息。 沒有那個,沒有什么人可以告訴你的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.