日期:2014-05-17  浏览次数:20854 次

【本人虚心学习】请大侠不吝赐教!
【Default.aspx文件代码:】
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Fong.Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    </div>
    </form>
</body>
</html>

【Default.aspx.cs文件代码:】
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fong
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Label1.Text = "我的第一个ASP.NET4.0网页!";
        }
    }
}

【浏览时显示】分析器错误消息: 未能加载类型“Fong.Default”。
请问是哪有问题?还是我的服务器没配置好?:Windows7,MDAC2.8,.NET Framework 4.0,IIS

------解决方案--------------------
用Visual Studio吧。