“/jsq”应用程序中的服务器错误。
--------------------------------------------------------------------------------
编译错误 
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。 
编译器错误信息: ASPNET: 请确保此代码文件中定义的类与“inherits”属性匹配,并且该类扩展的基类(例如 Page 或 UserControl)是正确的。
源错误:
行 12: namespace jsp
行 13: {
行 14:     public partial class Default2 : System.Web.UI.Page
行 15:     {
行 16:         protected void Page_Load(object sender, System.EventArgs e)
 
源文件: e:\WebSite\jsq\Default2.aspx.cs 行: 14
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.IO;
namespace count
{
    /// <summary>
    /// index 的摘要说明。
    /// </summary>
    public partial class index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // 在此处放置用户代码以初始化页面
            //计数器初始化为0
            int iCount=0;
            //存放计数器的文件
            string strPath=Server.MapPath("count.txt");
            //准备打开文件
            StreamReader ReadFile;
            try
            {
                //打开文件
                ReadFile=File.OpenText(strPath);
                //读取文件的第一行
                string strCount=ReadFile.ReadLine().Trim();
                //把第一行转化为数字
                iCount=int.Parse(strCount);
                //关闭文件
                ReadFile.Close();
            }
            catch
            {}
            //计数器加一
            iCount++;
            //输出
            Response.Write("<p align>您是第"+iCount+"位浏览者</p>");
            //准备写文件
            StreamWriter WriterFile;
            //建立一个文件
            WriterFile=File.CreateText(strPath);
            //把计数器写入文件中
            WriterFile.WriteLine(iCount);
            //关闭文件
            WriterFile.Close();
        }
        #region Web Form Designer generated code
        override protected void OnInit(EventArgs e)
        {
            //
            // CODEGEN:该调用是 ASP.NET Web 窗体设计器所必需的。
            //
            InitializeComponent();
            base.OnInit(e);
        }
        
        /// <summary>
        /// 设计器支持所需的方法 - 不要使用代码编辑器修改
        /// 此方法的内容。
        /// </summary>
        private void InitializeComponent()
        {    
        }
        #endregion
    }
}



 
											





 
	    

 
	